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.

MSP430F2416: Microcontroller goes to sleep mode after executing code randomly in field

Part Number: MSP430F2416
Other Parts Discussed in Thread: MSP430F149

Programming Procedure: 

We are using MSP430f2416 in production. We use Elprotronics to write flash memory in production. We blow JTag fuse after every programming and then subsequent programming we are using BSL programming. 

Code Description:

We are low powered battery operated instruments which uses MSP430. After each 15 seconds we go to deep sleep mode. This sleep mode unit is woken up by 5 different buttons on the wake up on interrupt pins. Then after 15 seconds unit goes to sleep mode. 

Following is the observation of the problem.

- Units are QCed, tested and out of the production in the field. After few months, unit comes in repair. 

- When you press the wake up one particular  'X' button out of five buttons unit turns on for just milliseconds and then go to sleep mode right away. Essentially unit doesn't turn on. If unit is turned on by other buttons then pressing button 'X' turns off the unit and go to deep sleep mode. 

Troubleshooting results:

- Hardware is perfect

- There is no obvious issue with the code. Code is running in the production for more than 15 years. Earlier we had MSP430F149 micro controller. We replace it with the new one 7 years ago. Problem seems to happened last couple of years. 

- There is no obvious stack issue or PC failure. 

- Power cycle doesn't help. Button 'X' always seems to make unit to go to sleep. 

My Questions:

- Is this a flash issue of reading the code? Is flash code is being corrupted?

- Is because of the flash error, micro controller is going to sleep mode?

- Is microcontroller resetting itself if it goes to reset vector? Does it execute the code from beginning if it goes to reset vector?

- Is there a known production flash failure issues in this micro controller?

- If flash key failure putting unit to reset how does it responds to other keys?

  • Hello,

    Thank you for your post. Since this device has been in the field and been returned, I'm suspecting the device has been damaged somehow. For example, ESD could have damaged the device. Is Button "X" always the same button out of the five buttons? Since you blow the JTAG fuse during production (which makes sense, but definitely hinders debugging abilities), can you read out the code via the BSL interface and then program this code onto a brand new device over JTAG? Can you observe the issue on the new device? If you can, then it'd be helpful to debug while you see the issue to see what's going on behind the scenes. I don't have the code, so I can't say that the behavior matches a certain flow in the code.

    Regards,

    James

    MSP Customer Applications
  • Hi James,

    So far we always had button 'X' which goes bad, though hardware event of pressing button 'X' is very clean. But recently we have another button 'Y' showing the same symptoms instead of the button 'X'.

    I tried to sniff check sum using the Elprotronics and Flashpro software using BSL on the field-return unit. During this process it suggested that reading checksum failure/reading flash failure/verifying flash failure. And it completely stopped working. When I reprogrammed the unit with the same code and it started working correctly. I honestly don't know another software and debugger will provide similar functionality. I have tried the Olimex rocket debugger but no luck on setting that up correctly.

    Is there a software tool or FET debugger I could use to copy code from the damaged unit using BSL? Is there a software that I could use to read and copy the code and dump it in another unit with JTAG fuse is blown? Or I have to keep the unit JTAG intact?

    Since there is no smoking gun, would you speculate if this is a flash read fail issue or PC issue or some other issue?

    I read in detail on the reset vector functionality in MSP430 and so far what I know is that - upon going to reset vector, it does put unit under sleep and reset the program counter to beginning of the code start. This is what seems to be going on in our case. Unit does try to wake up from sleep and then go back to sleep. It does response to other buttons so code is not truly crashed but reset to the beginning of the code start. Also pressing button 'X' turns off the on device.

    Perhaps you can shed some light on this one.

    Our code Logic -

    Main(){
    // initialize i/o
    // enable the interrupt wake up on sleep
    // set next mode wake up
    // put unit into sleep

    while(1){
    //check for key press
    // if the unit is on for 30 seconds put it in sleep
    // wake up on the key event
    // run the piece of code associated with the pressed key

    }

    }


    Looking forward to hearing from you.

    Thank you.

    Regards,
    nsolanki