How to put S9S12GA240 micro controller in sleep mode?. What is cpu current taking in sleep and run mode?
Hi,
please see the following document
Use G240-API+STOP-CW51 particular example.
Also some other SW examples demonstrating Low Power Modes you can find here:
AN4455, MC9S12G128/A240 Demonstration Lab Training - Application Notes
Regarding the MCU supply currents, please see Appendix A.3 in S12G datasheet:
MC9S12GRMV1, MC9S12G Family Reference Manual and Data Sheet
Regards,
iggi
Hi Iggi,
Could you please support me to reduce the current to max ?.
Hi iggi,
Thanks for your support. Here how i enable the sleep mode.
asm ANDCC #0x7F; /* Clear S-bit in the CCR to enable STOP instruction */
asm STOP; /* Enter Pseudo Stop mode */
But how to evoke the controller from sleep mode because i am not able to do any task after i entered sleep mode. I have gpio interrupt also in my code.
I am writing that 3 instuction in while(1) loop then only current reduced but device not able wake up from interrupt.
ex:
while(1)
{
if(interrupt_flag == true)
{
// do some task like toggle led
}
else
{
CPMUCLKS_PSTP = 1; /* Set PSTP bit to enable Pseudo Stop Mode */
asm ANDCC #0x7F; /* Clear S-bit in the CCR to enable STOP instruction */
asm STOP; /* Enter Pseudo Stop mode */
}
}
But interrupt_flag not setting.
Hi iggi,
Thanks for your support. Here how i enable the sleep mode.
CPMUCLKS_PSTP = 1; /* Set PSTP bit to enable Pseudo Stop
Mode */
asm ANDCC #0x7F; /* Clear S-bit in the CCR to enable
STOP instruction */
asm STOP; /* Enter Pseudo Stop mode */
But how to evoke the controller from sleep mode because i am not able to do
any task after i entered sleep mode. I have gpio interrupt also in my code.