MCF52255: Low power wait mode vs Bwt

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MCF52255: Low power wait mode vs Bwt

1,407 次查看
SLSL
Contributor I

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

标签 (1)
0 项奖励
回复
1 回复

712 次查看
SLSL
Contributor I

Other information

BWT counter is reset in RTC interrupt. RTC interrupt increment my SystemTick and it has frequency of 1000 Hz.

 

FEC interrupt seems cause problem to RTC interrupt... That's strange.

 

Steve

0 项奖励
回复