Hi,
I'm trying to implement Doze mode on the TMS470M(F06607) but am struggling to nail it down.
Using an initial HALCoGen base, all clock sources are set to the OSC at 16Mhz (no PLL engaged).
The software is an interrupt-based loop. Initial implementation just called "WFI" after each pass of the loop, which works fine, but extending this implementation to full doze, following section 2.2.2 of the RM, seems to put the device into a permanent catatonic state which proves difficult to recover from!
The code to enter Doze Mode consists of:
flashWREG->FBFALLBACK = 0;
flashWREG->FPAC1 &= ~(0x01);
systemREG->VRCTL = 0xF0;
systemREG->CSDISSET = 0x0E; //OSC on, PLL off, 32khz off, ext clk off, LPO's on
systemREG->CDDISSET = 0x3F;
asm(" wfi");
Once the device enters Doze, the debugger looses connection and the device then fails to wake from interrupt source. I have two sources of interrupt available: GIO (which scope confirms it drops to a LOW level) and DCAN1. These interrupts work fine when the device is in active mode.
Unfortunately, once the device has dozed, the only recovery is with a timed Uniflash Erase coupled with holding the reset. I've already lost one board to 'infinite doze' whereby it couldn't be recovered, hence I've lost my nerve a little and am seeking advice! FYI comment out the VRCTL statement above if you want to permanently kill your device!!
Anyone any ideas what I've done wrong in the implementation above?
cheers
Mat