Quantcast
Channel: MSP low-power microcontroller forum - Recent Threads
Viewing all articles
Browse latest Browse all 22075

MSP432P401R: Program goes wrong

$
0
0

Part Number:MSP432P401R

Hi,

We design our application with MSP432P401R, and have manufactured about 400 PCBAs, 2 of which act abnormally. We design to shutdown the PCBA with letting the chip go to LPM3, and wake it up with a Pushbutton interrupt. But the 2 PCBAs haven't done that.

I debug my program using the MSP-EXP432P401R as the XDS110 debugger in CCS6.1.3. Section of my "shutdown code" is as follows:

MAP_CS_initClockSignal(CS_MCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1);
MAP_CS_initClockSignal(CS_SMCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1);
MAP_CS_initClockSignal(CS_HSMCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); MAP_CS_initClockSignal(CS_ACLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); MAP_CS_initClockSignal(CS_BCLK,CS_LFXTCLK_SELECT,CS_CLOCK_DIVIDER_1); BITBAND_PERI(CS->CTL2, CS_CTL2_HFXT_EN_OFS) = 0; PJSEL0 &= ~0x0C; PJSEL0 |= 0x03; PJSEL1 &= ~0x0F; PJDIR |= 0x0C; PJOUT &= ~0x0C; RTC_C->CTL0 = RTCKEY; BITBAND_PERI(RTC_C->CTL0, RTCTEVIE_OFS) = 0; BITBAND_PERI(RTC_C->CTL0, RTCKEY_OFS) = 0; MAP_GPIO_registerInterrupt(GPIO_PORT_P5,PM_ULPStartIntHandler); MAP_Interrupt_enableInterrupt(INT_PORT5); if(AlarmEnabled == true) { MAP_RTC_C_enableInterrupt(RTC_C_CLOCK_ALARM_INTERRUPT); MAP_Interrupt_enableInterrupt(45); } else { MAP_RTC_C_disableInterrupt(RTC_C_CLOCK_ALARM_INTERRUPT); } BITBAND_PERI(P5IFG,3) = 0; BITBAND_PERI(P5IE,3) = 1; Interrupt_enableSleepOnIsrExit(); while(1) { MAP_PCM_gotoLPM3(); __no_operation(); }

where the  GPIO P5.3 is the pushbutton signal.

I set a breakpoint at the "while(1)" line, but the program won't get there at most tries (sometimes it will). When I suspend the running in CCS, there will be 2 cases. 

1. The program goes to an unexpected address, and CCS shows the following error:

and the "no source available" address is not the same from different tries. Some other address, such as 0x2260e4, 0x150d8c, may appear. 

2. The program stops in the CPU_wfi() function in driverlib.c. As I resume the program running, it will get the breakpoint at the "while(1)" line, but if I continue to run the program, there will always be a disconnection from the debugger with the following error:

CORTEX_M4_0: Can't Run Target CPU: (Error -2134 @ 0x0) Unable to control device execution state. Reset the device, and retry the
operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings (e.g. lower
TCLK). (Emulation package 6.0.222.0)
CORTEX_M4_0: JTAG Communication Error: (Error -614 @ 0x0) The target indicates there is an error condition from a previous SWD
request. Clear the error the condition, and try the SWD request again. (Emulation package 6.0.222.0) Reset the device to factory
settings?

If the program can get the "while(1)" line and enter LPM3, it will also go to an unexpected address in the Pushbutton ISR.

As only 2 of 400 PCBAs have such problem. I guess it's not a software fault, but I'm not sure. How can I figure it up?


Viewing all articles
Browse latest Browse all 22075

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>