Hi,
I have a problem with Unified Clock System module. When I wake-up MCU form low power state sometimes FLL loop can't catch correct frequency and DCOFFG flag in UCSCTL7 register is set. This is probably caused by incorrect DCO and MOD settings in register UCSCTL0 (value is 0x00F8). I turn on interrupt from UCS module and in ISR reset DCOFFG flag but nothing happends. UCSCTL0 value is still 0x00F8 and NMI interrup hang entire device. This error is very rarely and occurs only when device is switched from battery to main power by relay.
I created shapshot of all MCU registers when this occured.
521177 81 R PC 0x00000011 0x00BD8C R SP 0x00000011 0x0023EE R SR 0x0000000B 0x0000 R R3 0x00000011 0x000000 R R4 0x00000011 0x00FFFF R R5 0x00000011 0x000000 R R6 0x00000011 0x000000 R R7 0x00000011 0x000001 R R8 0x00000011 0x001C02 R R9 0x00000011 0x001E16 R R10 0x00000011 0x000000 R R11 0x00000011 0x000001 R R12 0x00000011 0x000000 R R13 0x00000011 0x000000 R R14 0x00000011 0x000000 R R15 0x00000011 0x000203 R Comparator_B_CBCTL0 0x0000000B 0x008C R Comparator_B_CBCTL1 0x0000000B 0x1609 R Comparator_B_CBCTL2 0x0000000B 0x37B3 R Comparator_B_CBCTL3 0x0000000B 0x7000 R Comparator_B_CBINT 0x0000000B 0x0102 R Comparator_B_CBIV 0x0000000B 0x0000 R CRC16_CRCDI 0x0000000B 0x0000 R CRC16_CRCDIRB 0x0000000B 0x0000 R CRC16_CRCINIRES 0x0000000B 0xFFFF R CRC16_CRCRESR 0x0000000B 0xFFFF R DMA_DMACTL0 0x0000000B 0x0000 R DMA_DMACTL1 0x0000000B 0x0000 R DMA_DMACTL2 0x0000000B 0x0000 R DMA_DMACTL3 0x0000000B 0x0000 R DMA_DMACTL4 0x0000000B 0x0000 R DMA_DMAIV 0x0000000B 0x0000 R DMA_DMA0CTL 0x0000000B 0x0000 R DMA_DMA0SA 0x0000001B 0x00000000 R DMA_DMA0DA 0x0000001B 0x00001000 R DMA_DMA0SZ 0x0000000B 0x0620 R DMA_DMA1CTL 0x0000000B 0x0000 R DMA_DMA1SA 0x0000001B 0x00000000 R DMA_DMA1DA 0x0000001B 0x00000000 R DMA_DMA1SZ 0x0000000B 0x0040 R DMA_DMA2CTL 0x0000000B 0x0000 R DMA_DMA2SA 0x0000001B 0x00000100 R DMA_DMA2DA 0x0000001B 0x00000004 R DMA_DMA2SZ 0x0000000B 0x0010 R Flash_FCTL1 0x0000000B 0x9600 R Flash_FCTL3 0x0000000B 0x9658 R Flash_FCTL4 0x0000000B 0x9600 R MPY_16__Multiplier__16_Bit_Mode_MPY 0x0000000B 0x0002 R MPY_16__Multiplier__16_Bit_Mode_MPYS 0x0000000B 0x0002 R MPY_16__Multiplier__16_Bit_Mode_MAC 0x0000000B 0x0002 R MPY_16__Multiplier__16_Bit_Mode_MACS 0x0000000B 0x0002 R MPY_16__Multiplier__16_Bit_Mode_OP2 0x0000000B 0x001A R MPY_16__Multiplier__16_Bit_Mode_RESLO 0x0000000B 0x0034 R MPY_16__Multiplier__16_Bit_Mode_RESHI 0x0000000B 0x0000 R MPY_16__Multiplier__16_Bit_Mode_SUMEXT 0x0000000B 0x0000 R MPY_16__Multiplier__16_Bit_Mode_MPY32CTL0 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_MPY32L 0x0000000B 0x0002 R MPY_32__Multiplier__32_Bit_Mode_MPY32H 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_MPYS32L 0x0000000B 0x0002 R MPY_32__Multiplier__32_Bit_Mode_MPYS32H 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_MAC32L 0x0000000B 0x0002 R MPY_32__Multiplier__32_Bit_Mode_MAC32H 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_MACS32L 0x0000000B 0x0002 R MPY_32__Multiplier__32_Bit_Mode_MACS32H 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_OP2L 0x0000000B 0x001A R MPY_32__Multiplier__32_Bit_Mode_OP2H 0x0000000B 0x05F5 R MPY_32__Multiplier__32_Bit_Mode_RES0 0x0000000B 0x0034 R MPY_32__Multiplier__32_Bit_Mode_RES1 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_RES2 0x0000000B 0x0000 R MPY_32__Multiplier__32_Bit_Mode_RES3 0x0000000B 0x0000 R Port_A_PAIN 0x0000000B 0xF0F6 R Port_A_PAOUT 0x0000000B 0x3000 R Port_A_PADIR 0x0000000B 0x3F09 R Port_A_PAREN 0x0000000B 0x0000 R Port_A_PADS 0x0000000B 0x0000 R Port_A_PASEL 0x0000000B 0x0006 R Port_A_PAIES 0x0000000B 0x8050 R Port_A_PAIE 0x0000000B 0xC0B0 R Port_A_PAIFG 0x0000000B 0xE3F2 R Port_1_2_P1IN 0x0000000D 0xF6 R Port_1_2_P1OUT 0x0000000D 0x00 R Port_1_2_P1DIR 0x0000000D 0x09 R Port_1_2_P1REN 0x0000000D 0x00 R Port_1_2_P1DS 0x0000000D 0x00 R Port_1_2_P1SEL 0x0000000D 0x06 R Port_1_2_P1IV 0x0000000B 0x000A R Port_1_2_P1IES 0x0000000D 0x50 R Port_1_2_P1IE 0x0000000D 0xB0 R Port_1_2_P1IFG 0x0000000D 0xF2 R Port_1_2_P2IN 0x0000000D 0xF0 R Port_1_2_P2OUT 0x0000000D 0x30 R Port_1_2_P2DIR 0x0000000D 0x3F R Port_1_2_P2REN 0x0000000D 0x00 R Port_1_2_P2DS 0x0000000D 0x00 R Port_1_2_P2SEL 0x0000000D 0x00 R Port_1_2_P2IV 0x0000000B 0x000E R Port_1_2_P2IES 0x0000000D 0x80 R Port_1_2_P2IE 0x0000000D 0xC0 R Port_1_2_P2IFG 0x0000000D 0xE3 R Port_B_PBIN 0x0000000B 0x00C0 R Port_B_PBOUT 0x0000000B 0x0000 R Port_B_PBDIR 0x0000000B 0x0013 R Port_B_PBREN 0x0000000B 0x0000 R Port_B_PBDS 0x0000000B 0x0000 R Port_B_PBSEL 0x0000000B 0x0000 R Port_3_P3IN 0x0000000D 0xC0 R Port_3_P3OUT 0x0000000D 0x00 R Port_3_P3DIR 0x0000000D 0x13 R Port_3_P3REN 0x0000000D 0x00 R Port_3_P3DS 0x0000000D 0x00 R Port_3_P3SEL 0x0000000D 0x00 R Port_J_PJIN 0x0000000B 0x0040 R Port_J_PJOUT 0x0000000B 0x0000 R Port_J_PJDIR 0x0000000B 0x0000 R Port_J_PJREN 0x0000000B 0x0000 R Port_J_PJDS 0x0000000B 0x0000 R Port_J_PJSEL 0x0000000B 0x0030 R Port_Mapping_Control_PMAPKEYID 0x0000000B 0x96A5 R Port_Mapping_Control_PMAPCTL 0x0000000B 0x0001 R Port_Mapping_Port_1_P1MAP01 0x0000000B 0x0201 R Port_Mapping_Port_1_P1MAP23 0x0000000B 0x0604 R Port_Mapping_Port_1_P1MAP45 0x0000000B 0x0305 R Port_Mapping_Port_1_P1MAP67 0x0000000B 0x0807 R Port_Mapping_Port_1_P1MAP0 0x0000000D 0x01 R Port_Mapping_Port_1_P1MAP1 0x0000000D 0x02 R Port_Mapping_Port_1_P1MAP2 0x0000000D 0x04 R Port_Mapping_Port_1_P1MAP3 0x0000000D 0x06 R Port_Mapping_Port_1_P1MAP4 0x0000000D 0x05 R Port_Mapping_Port_1_P1MAP5 0x0000000D 0x03 R Port_Mapping_Port_1_P1MAP6 0x0000000D 0x07 R Port_Mapping_Port_1_P1MAP7 0x0000000D 0x08 R Port_Mapping_Port_2_P2MAP01 0x0000000B 0x0A09 R Port_Mapping_Port_2_P2MAP23 0x0000000B 0x0C0B R Port_Mapping_Port_2_P2MAP45 0x0000000B 0x0E0D R Port_Mapping_Port_2_P2MAP67 0x0000000B 0x100F R Port_Mapping_Port_2_P2MAP0 0x0000000D 0x09 R Port_Mapping_Port_2_P2MAP1 0x0000000D 0x0A R Port_Mapping_Port_2_P2MAP2 0x0000000D 0x0B R Port_Mapping_Port_2_P2MAP3 0x0000000D 0x0C R Port_Mapping_Port_2_P2MAP4 0x0000000D 0x0D R Port_Mapping_Port_2_P2MAP5 0x0000000D 0x0E R Port_Mapping_Port_2_P2MAP6 0x0000000D 0x0F R Port_Mapping_Port_2_P2MAP7 0x0000000D 0x10 R Port_Mapping_Port_3_P3MAP01 0x0000000B 0x1211 R Port_Mapping_Port_3_P3MAP23 0x0000000B 0x1413 R Port_Mapping_Port_3_P3MAP45 0x0000000B 0x1815 R Port_Mapping_Port_3_P3MAP67 0x0000000B 0x1617 R Port_Mapping_Port_3_P3MAP0 0x0000000D 0x11 R Port_Mapping_Port_3_P3MAP1 0x0000000D 0x12 R Port_Mapping_Port_3_P3MAP2 0x0000000D 0x13 R Port_Mapping_Port_3_P3MAP3 0x0000000D 0x14 R Port_Mapping_Port_3_P3MAP4 0x0000000D 0x15 R Port_Mapping_Port_3_P3MAP5 0x0000000D 0x18 R Port_Mapping_Port_3_P3MAP6 0x0000000D 0x17 R Port_Mapping_Port_3_P3MAP7 0x0000000D 0x16 R PMM__Power_Management_System_PMMCTL0 0x0000000B 0x9602 R PMM__Power_Management_System_PMMCTL1 0x0000000B 0x0000 R PMM__Power_Management_System_SVSMHCTL 0x0000000B 0x4602 R PMM__Power_Management_System_SVSMLCTL 0x0000000B 0x4602 R PMM__Power_Management_System_SVSMIO 0x0000000B 0x0020 R PMM__Power_Management_System_PMMIFG 0x0000000B 0x0011 R PMM__Power_Management_System_PMMRIE 0x0000000B 0x1100 R PMM__Power_Management_System_PM5CTL0 0x0000000B 0x0000 R RC__RAM_Control_Module_RCCTL0 0x0000000B 0x6900 R Shared_Reference_REFCTL0 0x0000000B 0x0280 R SFR__Special_Function_Registers_SFRIE1 0x0000000B 0x0002 R SFR__Special_Function_Registers_SFRIFG1 0x0000000B 0x0082 R SFR__Special_Function_Registers_SFRRPCR 0x0000000B 0x000D R SYS__System_Module_SYSCTL 0x0000000B 0x0000 R SYS__System_Module_SYSBSLC 0x0000000B 0x8003 R SYS__System_Module_SYSJMBC 0x0000000B 0x000C R SYS__System_Module_SYSJMBI0 0x0000000B 0x0000 R SYS__System_Module_SYSJMBI1 0x0000000B 0x0000 R SYS__System_Module_SYSJMBO0 0x0000000B 0x0000 R SYS__System_Module_SYSJMBO1 0x0000000B 0x0000 R SYS__System_Module_SYSBERRIV 0x0000000B 0x3FFF R SYS__System_Module_SYSUNIV 0x0000000B 0x0004 R SYS__System_Module_SYSSNIV 0x0000000B 0x0000 R SYS__System_Module_SYSRSTIV 0x0000000B 0x0000 R Timer0_A3_TA0CTL 0x0000000B 0x0111 R Timer0_A3_TA0CCTL0 0x0000000B 0x0011 R Timer0_A3_TA0CCTL1 0x0000000B 0x0001 R Timer0_A3_TA0CCTL2 0x0000000B 0x0001 R Timer0_A3_TA0R 0x0000000B 0x21DE R Timer0_A3_TA0CCR0 0x0000000B 0x4000 R Timer0_A3_TA0CCR1 0x0000000B 0x0000 R Timer0_A3_TA0CCR2 0x0000000B 0x0000 R Timer0_A3_TA0IV 0x0000000B 0x0000 R Timer0_A3_TA0EX0 0x0000000B 0x0000 R Timer0_D3_TD0CTL0 0x0000000B 0x02C1 R Timer0_D3_TD0CTL1 0x0000000B 0x0700 R Timer0_D3_TD0CTL2 0x0000000B 0x0000 R Timer0_D3_TD0R 0x0000000B 0x2E57 R Timer0_D3_TD0CCTL0 0x0000000B 0x0000 R Timer0_D3_TD0CCR0 0x0000000B 0x493E R Timer0_D3_TD0CL0 0x0000000B 0x493E R Timer0_D3_TD0CCTL1 0x0000000B 0x0001 R Timer0_D3_TD0CCR1 0x0000000B 0x0000 R Timer0_D3_TD0CL1 0x0000000B 0x0000 R Timer0_D3_TD0CCTL2 0x0000000B 0x0001 R Timer0_D3_TD0CCR2 0x0000000B 0x0000 R Timer0_D3_TD0CL2 0x0000000B 0x0000 R Timer0_D3_TD0HCTL0 0x0000000B 0x0000 R Timer0_D3_TD0HCTL1 0x0000000B 0x0080 R Timer0_D3_TD0HINT 0x0000000B 0x0000 R Timer0_D3_TD0IV 0x0000000B 0x0000 R Timer1_D3_TD1CTL0 0x0000000B 0x0000 R Timer1_D3_TD1CTL1 0x0000000B 0x0000 R Timer1_D3_TD1CTL2 0x0000000B 0x0000 R Timer1_D3_TD1R 0x0000000B 0x0000 R Timer1_D3_TD1CCTL0 0x0000000B 0x0000 R Timer1_D3_TD1CCR0 0x0000000B 0x0000 R Timer1_D3_TD1CL0 0x0000000B 0x0000 R Timer1_D3_TD1CCTL1 0x0000000B 0x0000 R Timer1_D3_TD1CCR1 0x0000000B 0x0000 R Timer1_D3_TD1CL1 0x0000000B 0x0000 R Timer1_D3_TD1CCTL2 0x0000000B 0x0000 R Timer1_D3_TD1CCR2 0x0000000B 0x0000 R Timer1_D3_TD1CL2 0x0000000B 0x0000 R Timer1_D3_TD1HCTL0 0x0000000B 0x0000 R Timer1_D3_TD1HCTL1 0x0000000B 0x0080 R Timer1_D3_TD1HINT 0x0000000B 0x0000 R Timer1_D3_TD1IV 0x0000000B 0x0000 R Timer_Event_Control_TEC0XCTL0 0x0000000B 0x0000 R Timer_Event_Control_TEC0XCTL1 0x0000000B 0x0000 R Timer_Event_Control_TEC0XCTL2 0x0000000B 0x0000 R Timer_Event_Control_TEC0STA 0x0000000B 0x0000 R Timer_Event_Control_TEC0XINT 0x0000000B 0x0000 R Timer_Event_Control_TEC0IV 0x0000000B 0x0000 R UCS__Unified_System_Clock_UCSCTL0 0x0000000B 0x00F8 R UCS__Unified_System_Clock_UCSCTL1 0x0000000B 0x0060 R UCS__Unified_System_Clock_UCSCTL2 0x0000000B 0x11F3 R UCS__Unified_System_Clock_UCSCTL3 0x0000000B 0x0020 R UCS__Unified_System_Clock_UCSCTL4 0x0000000B 0x0404 R UCS__Unified_System_Clock_UCSCTL5 0x0000000B 0x0000 R UCS__Unified_System_Clock_UCSCTL6 0x0000000B 0xC1ED R UCS__Unified_System_Clock_UCSCTL7 0x0000000B 0x0711 R UCS__Unified_System_Clock_UCSCTL8 0x0000000B 0x0706 R USCI_A0__UART_Mode_UCA0CTLW0 0x0000000B 0x0081 R USCI_A0__UART_Mode_UCA0CTL0 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0CTL1 0x0000000D 0x81 R USCI_A0__UART_Mode_UCA0BRW 0x0000000B 0x001A R USCI_A0__UART_Mode_UCA0BR0 0x0000000D 0x1A R USCI_A0__UART_Mode_UCA0BR1 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0MCTL 0x0000000D 0x11 R USCI_A0__UART_Mode_UCA0STAT 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0RXBUF 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0TXBUF 0x0000000D 0x1E R USCI_A0__UART_Mode_UCA0ABCTL 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0IRCTL 0x0000000B 0x0000 R USCI_A0__UART_Mode_UCA0IRTCTL 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0IRRCTL 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0ICTL 0x0000000B 0x0200 R USCI_A0__UART_Mode_UCA0IE 0x0000000D 0x00 R USCI_A0__UART_Mode_UCA0IFG 0x0000000D 0x02 R USCI_A0__UART_Mode_UCA0IV 0x0000000B 0x0000 R USCI_A0__SPI_Mode_UCA0CTLW0__SPI 0x0000000B 0x0081 R USCI_A0__SPI_Mode_UCA0CTL0__SPI 0x0000000D 0x00 R USCI_A0__SPI_Mode_UCA0CTL1__SPI 0x0000000D 0x81 R USCI_A0__SPI_Mode_UCA0BRW__SPI 0x0000000B 0x001A R USCI_A0__SPI_Mode_UCA0BR0__SPI 0x0000000D 0x1A R USCI_A0__SPI_Mode_UCA0BR1__SPI 0x0000000D 0x00 R USCI_A0__SPI_Mode_UCA0MCTL__SPI 0x0000000D 0x11 R USCI_A0__SPI_Mode_UCA0STAT__SPI 0x0000000D 0x00 R USCI_A0__SPI_Mode_UCA0RXBUF__SPI 0x0000000D 0x00 R USCI_A0__SPI_Mode_UCA0TXBUF__SPI 0x0000000D 0x1E R USCI_A0__SPI_Mode_UCA0ICTL__SPI 0x0000000B 0x0200 R USCI_A0__SPI_Mode_UCA0IE__SPI 0x0000000D 0x00 R USCI_A0__SPI_Mode_UCA0IFG__SPI 0x0000000D 0x02 R USCI_A0__SPI_Mode_UCA0IV__SPI 0x0000000B 0x0000 R USCI_B0__SPI_Mode_UCB0CTLW0__SPI 0x0000000B 0x0101 R USCI_B0__SPI_Mode_UCB0CTL0__SPI 0x0000000D 0x01 R USCI_B0__SPI_Mode_UCB0CTL1__SPI 0x0000000D 0x01 R USCI_B0__SPI_Mode_UCB0BRW__SPI 0x0000000B 0x0000 R USCI_B0__SPI_Mode_UCB0BR0__SPI 0x0000000D 0x00 R USCI_B0__SPI_Mode_UCB0BR1__SPI 0x0000000D 0x00 R USCI_B0__SPI_Mode_UCB0STAT__SPI 0x0000000D 0x00 R USCI_B0__SPI_Mode_UCB0RXBUF__SPI 0x0000000D 0x00 R USCI_B0__SPI_Mode_UCB0TXBUF__SPI 0x0000000D 0x00 R USCI_B0__SPI_Mode_UCB0ICTL__SPI 0x0000000B 0x0200 R USCI_B0__SPI_Mode_UCB0IE__SPI 0x0000000D 0x00 R USCI_B0__SPI_Mode_UCB0IFG__SPI 0x0000000D 0x02 R USCI_B0__SPI_Mode_UCB0IV__SPI 0x0000000B 0x0000 R USCI_B0__I2C_Mode_UCB0CTLW0 0x0000000B 0x0101 R USCI_B0__I2C_Mode_UCB0CTL0 0x0000000D 0x01 R USCI_B0__I2C_Mode_UCB0CTL1 0x0000000D 0x01 R USCI_B0__I2C_Mode_UCB0BRW 0x0000000B 0x0000 R USCI_B0__I2C_Mode_UCB0BR0 0x0000000D 0x00 R USCI_B0__I2C_Mode_UCB0BR1 0x0000000D 0x00 R USCI_B0__I2C_Mode_UCB0STAT 0x0000000D 0x00 R USCI_B0__I2C_Mode_UCB0RXBUF 0x0000000D 0x00 R USCI_B0__I2C_Mode_UCB0TXBUF 0x0000000D 0x00 R USCI_B0__I2C_Mode_UCB0I2COA 0x0000000B 0x0000 R USCI_B0__I2C_Mode_UCB0I2CSA 0x0000000B 0x0000 R USCI_B0__I2C_Mode_UCB0ICTL 0x0000000B 0x0200 R USCI_B0__I2C_Mode_UCB0IE 0x0000000D 0x00 R USCI_B0__I2C_Mode_UCB0IFG 0x0000000D 0x02 R USCI_B0__I2C_Mode_UCB0IV 0x0000000B 0x0000 R Watchdog_Timer_WDTCTL 0x0000000B 0x6980
Best regards,
Pawel