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.

[参考译文] MSP432E401Y:如何解锁 PD7引脚

Guru**** 2124260 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/986060/msp432e401y-how-to-unlock-pd7-pin

器件型号:MSP432E401Y

你(们)好 我正在尝试解锁 MSP432E40142 GPIO 引脚的 PD7引脚。 我知道您必须使用 GPIOLOCK 和 GPIOCR。  

我现在尝试的代码是:

uint32_t GPIOLOCK = 0x4405B520;

HWREG (GPIOLOCK)= 0x4C4F4348;

要使用 HWREG(),我包含了 ti/ccs1020/ccs/tools/compiler/dMED/HTML/225.html 文件。

HWREG()函数调用现在抛出"expression must be a modifiable lvalue"错误。

如果除了 HWREG 之外还有一种更好的存储器访问方法、我就听不到了。