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.

MSP430F6723: SYSUNIV Incorrect Value on Voltage Source Switch (AUX System)

Other Parts Discussed in Thread: MSP430F6723

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;
	}
}

  • BUSIFG Is not necessarily an USB error. From users guide:

    “ In general, any type of system related bus error or timeout error is associated with a user NMI event. Upon this event, the SYSUNIV contains an offset value corresponding to a bus error event (BUSIFG).”

     Actually, which value would you expect in case of AUXSWNMIE? There is no such NMI type listed in the SYSUNIV register. I’d say, the BUSIFG is exactly the event that it reported in case of an AUX module NMI. You can then check AUXIFG to see whether it was the AUX module that triggered the NMI.

  • Thanks for your response Jens-Michael. After reading it I realized that my understanding of NMIs is probably incorrect. It was my impression that an NMI generated by any peripheral is a UNMI, and will set NMIIFG in SYSUNIV. I thought that the UNMI ISR would then poll the different peripheral IV registers to learn the source. I believe this confusion stems from the fact that section 1.3.1 in the manual discusses both NMIs in general, as well as the specific NMIs handled by the SYS module. I interpreted this to mean that all NMIs are handled by the SYS module.

    However, after going through section 1.3.1 again I realized that the NMIIFG flag is probably only used for an event on the RST/NMI pin. The ISRs for individual peripherals would then handle the NMIs for those peripherals. Is this accurate?

    Also as a side note: I don't exactly how a BUSIFG could be related to an AUX supply switch. It seems to be generated when I take away the main supply and let the chip run on AUXVCC1. Would an AUX supply switch be considered a "bus" or "timeout" error? Does this indicate some corruption on the system bus during the switch? Do you know if a list exists of the specific triggers for the BUSIFG flag?

  • Yes, NMIIFG is just the NMI pin interrupt. There aren’t many different NMI sources from peripheral modules. However, BUSIFG seems to be a generic ‘NMI from a non-standard module’.
    There is no list of possible sources. But the users guide has the hint ‘see device-.specific datasheet for details. And indeed, the system module chapter contains a list of interrupts for the different IV registers, listing AUXSWNMIIFG (not BUSIFG) as source for SYSUNIV:8

  • Ahh yes you're right, the datasheet does list AUXSWNMIFG as offset 8 in SYSUNIV rather than BUSIFG. I should have checked the datasheet for the final word (though it seems that should be mentioned in the User's Guide as well). Thanks for your help!

  • I guess, the AUX module has been added to the users guide after the USB module. So when the SYSUNIV register description was done, USB was the only one around. And later, it was simply forgotten to extend the SYSUNIV register description.

**Attention** This is a public forum