I've been implementing some firmware with the Auxiliary Supply System of the MSP430F6723 and have come across a behavior of SYSUNIV that I don't understand. I have connected voltage sources to DVCC and AUXVCC1, and am turning them alternately on and off to test supply switching. I have enabled a non-maskable interrupt on supply switch via the AUXSWNMIE bit of the AUXIE register.
Through the debugger I have verified that the UNMI ISR is entered correctly when the supply is switched; however the value of SYSUNIV at this point is always 8 (BUSIFG) rather than the expected 2 (NMIFG). This behavior is especially strange because this device does not have USB module, so SYSUNIV should never have the value 8 (BUSIFG).
My test code is below for reference. I put the breakpoint on the "switch" line of the interrupt. The program always breaks at this point when DVCC is turned off or back on, and at that point the value of SYSUNIV is 8 (BUSIFG) according to the debugger. Am I missing something? Has anybody seen this issue before, or have any thoughts on what's going on?
#include "msp430f6723.h" int main(void) { WDTCTL = WDTPW + WDTHOLD; /** Stop WDT */ AUXCTL0 = ((AUXCTL0 & 0xFF) | AUXKEY) & ~LOCKAUX; /** Unlock AUX system */ PJOUT &= ~0x04; /** Turn LED off */ PJDIR |= 0x04; /** Initialize LED */ AUXIE |= AUXSWNMIE; /** Enable non-maskable AUX interrupt */ while (1) { } } #pragma vector=UNMI_VECTOR __interrupt void unmiInterrupt() { switch (__even_in_range(SYSUNIV, 0x08)) { case 0x00: /** No interrupts */ break; case 0x02: /** NMIFG: Non-maskable interrupt flag */ PJOUT ^= 0x04; /** Toggle LED */ break; case 0x04: /** OFIFG: Oscillator fault interrupt flag */ break; case 0x06: /** ACCVIFG: Access violation flag */ break; default: break; } }