VLLSx on Coldefile+

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
919件の閲覧回数
nz_developer
Contributor II

Trying to get a coldfire+ into VLLS3 mode but when I measure the current it is not dropping (3uA according to datasheet. I am at several mA.)

 

Any Ideas? I call the Sleep function to put into low power mode

 

void deepsleep (void)

{

/* Set the SLEEPDEEP bit to enable deep sleep mode (STOP) */

    asm (  stop #0x2000; );

}

 

void Sleep(void){

    u8 dummyread;

    SetAlarm(10); // wake up in 10 seconds

   

    SetLLWU(); // setup wakeup events

        SMC_PMPROT = SMC_PMPROT_AVLLS_MASK;

           

         SMC_PMCTRL &= ~SMC_PMCTRL_STOPM_MASK ;

         SMC_PMCTRL |= SMC_PMCTRL_STOPM(0x4) ;

         dummyread = SMC_PMCTRL_STOPM(0x4);

         SMC_VLLSCTRL =  BIT2; 

        /*wait for write to complete to SMC before stopping core */

         dummyread = SMC_VLLSCTRL;

        dummyread = SMC_PMCTRL;

           deepsleep();

}

 


ラベル(1)
0 件の賞賛
1 解決策
734件の閲覧回数
nz_developer
Contributor II

Found the problem, it was a register to enable stop mode had not been set right. Used Processor expert to setup and that solved it. Got 3uA draw and wake on timer or one of my 3 buttons, very nice.

元の投稿で解決策を見る

0 件の賞賛
6 返答(返信)
734件の閲覧回数
Nouchi
Senior Contributor II

Hello,

You have to take care about unused pins, they must be configured as output, or tied to vdd, because floating pin may draw current.

Emmanuel

734件の閲覧回数
nz_developer
Contributor II

Hi Thanks,

Can I just set to output low? some of my pins need to be low while in Sleep mode.

Thanks again

0 件の賞賛
734件の閲覧回数
Nouchi
Senior Contributor II

Yes but, if you have some pull-up on it, it will drawn current, so you have to take to disable internals pull-up and remove external if needed.

0 件の賞賛
734件の閲覧回数
nz_developer
Contributor II

Tried lots of port configeration settings including disabling all ports etc. Got the current down to 360uA about 100x what I should be getting from the datasheet. Not too easy to solve, I will request support from Freescale through distributor.

0 件の賞賛
734件の閲覧回数
Nouchi
Senior Contributor II

You have maybe something still powered or clocked.

When you begin to play with micro amps, you have to hunt for leaks.

0 件の賞賛
735件の閲覧回数
nz_developer
Contributor II

Found the problem, it was a register to enable stop mode had not been set right. Used Processor expert to setup and that solved it. Got 3uA draw and wake on timer or one of my 3 buttons, very nice.

0 件の賞賛