This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

如何配置 Register 19: GPIO Lock (GPIOLOCK),

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.