由于头文件没有定义SVSCTL所以用指针直接操作寄存器,但是无论怎么操作也无法写入,是否是由于msp430g2332不支持此项功能。具体操作如下:
#define SVSCTL_FLASHADDR 0x0055
#define SVSCTL_NET (*(uint8_t *)SVSCTL_FLASHADDR)
SVSCTL_NET = 0xf8;
通过仿真看,0x0055地址数据是0x20;串口打出来的却是0x42;
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.
由于头文件没有定义SVSCTL所以用指针直接操作寄存器,但是无论怎么操作也无法写入,是否是由于msp430g2332不支持此项功能。具体操作如下:
#define SVSCTL_FLASHADDR 0x0055
#define SVSCTL_NET (*(uint8_t *)SVSCTL_FLASHADDR)
SVSCTL_NET = 0xf8;
通过仿真看,0x0055地址数据是0x20;串口打出来的却是0x42;