找到问题了,谢谢
CSCTL0 Register Description:CSKEY password. Must always be written with A5h; a PUC is generated if any
other value is written. Always reads as 96h. After the correct password is written,
all CS registers are available for writing.
寄存器章节开始处这样说:The password defined in CSCTL0 controls access to the CS registers. After the correct password is written in word mode, write access to the CS registers is enabled. Write access is disabled by writing an incorrect password in byte mode to the CSCTL0 upper byte.
// CSCTL0 = 0;改为// CSCTL0_H = 0;
库函数程序是这样的:
// Unlock CS control register
HWREG16(CS_BASE + OFS_CSCTL0) = CSKEY;
......//时钟配置
// Lock CS control register
HWREG8(CS_BASE + OFS_CSCTL0_H) = 0x00;
也是学到了
|