- PM5CTL0 &= ~LOCKLPM5; // Disable the GPIO power-on default high-impedance mode
- // to activate previously configured port settings
总有使用TI的430launchPad的时候,发现IO的设置以及不能和以前习惯的F1系列那样了,但是如何恢复了,这次,为大家带来LaunchPad的编程时的快速解决这些问题的办法。
LOCKLPM5 这个标志位官方是这样解释的:
Locks I/O pin and other LPMx.5 relevant (for example, RTC) configurations upon exit from LPMx.5. After a power cycle I/O pins are locked in high-impedance state with input Schmitt triggers disabled until LOCKLPM5 is cleared by user. After a wake-up from LPMx.5 I/O pins and other LPMx.5 relevant (for example, RTC) configurations are locked in their states configured prior to LPMx.5 entry until LOCKLPM5 is cleared by user. 0b = I/O pin and LPMx.5 configurations unlocked. 1b = I/O pin and LPMx.5 configuration remains locked.