GPIO—LOCK 值为00000001
这样GPIO—CR值将不能再修改,也就导致其它相应寄存器不能修改;
尝试方法:
GPIO_O_LOCK=0X4C4F434B;
GPIO_O_CR|=0XFF;
提示错误:
Description Resource Path Location Type
#138 expression must be a modifiable lvalue main.c /CH3_1_LCD line 153 C/C++ Problem
#138 expression must be a modifiable lvalue main.c /CH3_1_LCD line 152 C/C++ Problem
用例程的代码: HWREG(GPIO_PORTD_BASE+GPIO_O_LOCK) |= GPIO_LOCK_KEY;
编译能通过,但是在Debug时,运行到这一步提示如下错误:
No source available for "SysCtlDelay() at D:/CCSV6\CH3_1_LCD\Debug\CH3_1_LCD.out:{3} 0xda2c2808{4}"
Console中提示为:
CORTEX_M4_0: GEL Output:Memory Map Initialization Complete
CORTEX_M4_0: Error: Debug Port error occurred.
CORTEX_M4_0: Trouble Reading Memory Block at 0xda2c2804 on Page 0 of Length 0x14: Debug Port error occurred.
user4007620:
回复 user151383853:
看了源码,基本明白。
这个HWREG()还是很有必要的。