Hi
I tried to use full sleep mode while found this in datasheet:
"The system stop modes are entered if the CPU executes the STOP instruction unless either the XGATE is
active or an NVM command is active. "
What is "the STOP instruction"?
What should i do except setting PSTP to zero?
Hi,
See the following document where you can download set of example projects:
LAMA's S12XE unofficial examples
Find the projects demonstrating usage of Stop mode such as 'XEP100-STOP-WakeUp-CW47.zip'.
The most important thing in order to enter stop mode is to clear S-bit in CCR register and then execute stop instruction, therefore two codelines:
//-----------------------------------------------------------------------------------------
asm ANDCC #0x7F; //clear S bit - enable stop mode
asm STOP; //enter stop mode
/*If the S bit is not cleared then STOP instruction has no effect and is executed as a dummy instruction NOP*/
//----------------------------------------------------------------------------------------
Have a great day,
iggi
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------