Steve Legare

MCF52255: Low power wait mode vs Bwt

Discussion created by Steve Legare on Feb 18, 2010
Latest reply on Feb 19, 2010 by Steve Legare

Hi,

 

I try to decrease current consumed by MCU (MCF52255).  I define two functions for that. First function turns MCU in low power Stop mode (deepest mode). Here is code for this action:

 

MCF_PMM_LPCR = 0
      | MCF_PMM_LPCR_LPMD_STOP          //Select stop mode 
      | MCF_PMM_LPCR_STPMD_ALL_DISABLED; // Highest stop level  
   
   MCF_PMM_LPICR = 0
      | MCF_PMM_LPICR_XLPM_IPL(5)  // Only level 6-7 exit from stop mode 
      | MCF_PMM_LPICR_ENBSTOP;      // Activate low power mode   
   
   asm( stop #0x2000);

 

The second function turns MCU in low power Wait mode. In this mode, I want CPU answers to interrupts. Here is code for this action:

 

MCF_PMM_LPCR = MCF_PMM_LPCR_LPMD_WAIT;          // Select wait mode 

 

MCF_PMM_LPICR = 0

| MCF_PMM_LPICR_XLPM_IPL(0)   // Any level can wake up MCU 

       | MCF_PMM_LPICR_ENBSTOP;      // Activate low power mode   

 

   asm( stop #0x2000);

 

 

If I use wait or stop function, when MCU is idle and FEC is not used (MCU does not wait for a FEC interrupt), that works well. When FEC is not used, external PHY is in Power Down mode.

 

There is a problem when I want use wait function when MCU is idle and FEC is used:  I don't know why, but Backup Watchdog Timer (BWT) resets MCU in this case (RSR register has 0x80 after MCU reset).

 

Do you have hints for me? 

 

Thanks, 

Steve

Outcomes