Other Parts Discussed in Thread: MSP430F6659, MSP430F5342
Hello everyone,
Working with a new device that uses MSP430F5659 we ran into a problem: in some cases the microcontroller won't wake from LPM3. After going through errata we couldn't find anything that explains this except that it's similar to PMM15. We narrowed to it being that a timer IFG turned true during the ISR for the same timer and after exiting the ISR and going back to LPM3 it didn't reenter the ISR. We solved this by manually clearing and setting the IFG when required. This is error number 1, which I can no longer be sure of because of what's happening now.
Which brings me to error 2. The current code freezes in a way that will no longer service any ISR, nor DMA and does not even reset with the Watchdog.
While testing we found a case where it will get stuck in LPM3. The code has ISRs for 2 timers, both from TB0 at 32kHz, once the timer is set the ISRs set the next timeout band alternate between the timers (one carries ma period, the other shorter operation timeouts). In parallel the main code runs other operations that will yield control to the ISRs. At some point the ISR will return and when it re-enters LPM3 it will not wake up. We tried using a DMA, other interrupts and a Watchdog and nothing works when it gets in this state.
What seems to make the problem go away, is turning off the SVS. We use only SVSH, with SVSL and both SVM off. Also changing from automatic (Full performance/Normal) to manual seems to do the trick too.
The error is extremely code dependent, so we assume timing is important. We are working to reduce the code to something we can upload, but it will take at least another couple days.
Has anyone ran into an error like this?