Sleep Mode implementation for S12ZVMC128 controller

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sleep Mode implementation for S12ZVMC128 controller

796 Views
gayatrimeti
Contributor I

hi,

We are facing an issue in sleep and wakeup functionality for S12ZVMC128.

We are setting the following registers before enetring into sleep mode:

CANRIER|=0x80;
CANCTL0|=0x06;

We have observed that the MSCAN enetrs into sleep mode by monitoring the SLPAK bit in the CANCTL1 register, Whereas, the controller is still in active state as the current consumption does not reduce.

Please provide the Port Pin settings to enter into controller sleep state and let me know the procedure that is followed.

Labels (1)
0 Kudos
1 Reply

367 Views
RadekS
NXP Employee
NXP Employee

Hi gayatri,

This is a just misunderstanding. MSCAN mode and CPU mode are independent. See Table 13-37. CPU vs. MSCAN Operating Modes in RM.

Recommend process: enter into MSCAN Sleep mode for avoiding issues on CAN bus and after that enter into CPU STOP mode for power save. Enter into CPU STOP mode will cause MSCAN Power Down mode.

About CPU STOP mode)

You need clear S control bit in CCL register and execute assembler STOP command for entering CPU into STOP mode.

For example:

  asm ANDCC #0x7F;  //clear S bit - enable the stop mode. If the S bit is not

//cleared then STOP instruction has no effect and is

//executed as a dummy instruction NOP.

asm STOP; //STOP mode

Example code:

https://community.freescale.com/docs/DOC-173312

S12Z CPU Reference Manual:

http://www.nxp.com/files/microcontrollers/doc/ref_manual/S12ZCPU_RM_V1.pdf


I hope it helps you.

Have a great day,
RadekS

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos