Spend current in MC9S12P64 STOP mode

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

Spend current in MC9S12P64 STOP mode

591 次查看
Lucidfall
Contributor I

Hello.

 

I am implementing full stop mode using S12P64.

 

     CPMUPROT = 0x26;

     CPMUOSC_OSCE=0; // full stop mode

     CPMUCLKS_PSTP=0; // full stop mode

     CPMUPROT = 0x01;

     asm ANDCC #0x7F;     // Stop Mode Enable

     asm STOP;                   // stop mode

 

I checked XTAL through Oscilloscope and there is no oscillation.

But still main loop is working and ECU spend current (7mA)

I used external Oscillator (CPMUOSC_OSCE=1) for source clock.

 

Should I do more thing?

 

Please help me..Thanks.

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

346 次查看
iggi
NXP Employee
NXP Employee

Hello,

Use the app note AN3937 MC9S12P Family Demo Lab Software. There are example projects for Low Power Modes and System Clocks which are helpful for your case.

http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3937.pdf
http://cache.freescale.com/files/microcontrollers/doc/app_note/AN3937SW.zip

It seems like you didn't configure the system clock so it was not initialized. I recommend to test it on Internal Clock firstly. This is so called PEI mode:

/* initialise the system clock PEI - 50MHz VCO, 12.5MHz Bus CLK, from 1MHz Internal Clock */

        CPMUPROT = 0x26;                /* Clear PROT bit, disable protection of clock configuration registers */

        CPMUSYNR = 0x58;                /* SYNDIV = 31, VCO frequency 48 - 64 MHz */

        CPMUPOSTDIV = 0x01;          /* POSTDIV = 1 */

        CPMUCLKS = 0x80;                /* PLLSEL = 1 */

        while (CPMUCLKS != 0x80);      /* Verify CPMUCLKS configuration */

        CPMUPROT = 0x01;                /* Set PROT bit, enable protection of clock configuration registers */

        while(!CPMUFLG_LOCK);        /* wait for PLL to lock */

Also, i've attached an example code of STOP mode written for S12XET256 target MCU. This is for a reference only to see how it is done.

Regards,

Ivan

0 项奖励