Part Number:MSP430F5438A
Hey everyone,
I'm currently experiencing an issue where my application will not run in standalone. I'm using IAR Embedded Workbench 7.11.2 for development and programming via Spy-Bi-Wire. When using "Download and Debug" to program the device, the code runs as expected after hitting the "Start" button. However, only using "Download" to successfully program the device results in no obvious indication that the code is running (to get to the bottom of this, I have a simple loop blinking an LED to indicate if the code is running). One workaround for this is to use the MSP-FET debugger to attach to the running target after downloading the application and then manually hitting the "Start" button, but obviously, this is nowhere near ideal. The problem seems to be that the device never receives the "start" signal that the user would normally provide in debug mode.
Also, I took the separate route of attempting to program the device using the MSP430 Flasher command line tool. Using the following command results in the device being successfully programmed, but as stated in the MSP430 Flasher user guide, the default exit specification results in the device being powered down after programming and target code execution does not start.
MSP430Flasher -n MSP430F5438A -e ERASE_MAIN -w SPPDemo.txt
As expected, no LEDs blink and the code does not run. Performing a power cycle does not fix the issue either.
Digging deeper into the exit specifications, I modified the command to ensure that target code execution starts using -z [VCC] (as specified in Section 4 of the MSP Flasher user guide):
MSP430Flasher -n MSP430F5438A -e ERASE_MAIN -w SPPDemo.txt -v -z [VCC]
Unsurprisingly, the code runs as expected, blinking LED and all! But, once I power cycle the device, I end up back at square one where there's no indication of the code running, seemingly sitting at the beginning of the code, waiting to execute. After power cycling the device, I can use the Flasher to get the application to run again by asserting the same exit specification as before, forcing the code to begin execution:
MSP430Flasher -n MSP430F5438A -z [VCC]
I'd like to also point out that VCC_TOOL isn't connected to my MSP-FET, so -z [VCC] doesn't accomplish anything other than sending some sort of start command to the MCU.
I've been hitting my head against the wall for the last three days trying to determine why this code won't run in standalone mode and figured it'd be best to get some outside help. My hunch is that the target code is not beginning execution for some reason when in standalone. Please let me know what you think!