Sleep Mode for S9S12GA240

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

Sleep Mode for S9S12GA240

1,280 Views
punithb
Contributor I


How to put S9S12GA240 micro controller in sleep mode?. What is cpu current taking in sleep and run mode?

Labels (1)
0 Kudos
Reply
4 Replies

1,037 Views
iggi
NXP Employee
NXP Employee

Hi,

please see the following document

S12G Examples Pack

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

AN4455SW

Regarding the MCU supply currents, please see Appendix A.3 in S12G datasheet:

MC9S12GRMV1, MC9S12G Family Reference Manual and Data Sheet

Regards,

iggi

0 Kudos
Reply

1,037 Views
punithb
Contributor I

Hi Iggi,

Could you please support me to reduce the current to max ?.

0 Kudos
Reply

1,037 Views
punithb
Contributor I

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.

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.

0 Kudos
Reply

1,037 Views
punithb
Contributor I

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.

0 Kudos
Reply