MC9S08PA4 of wait mode question

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

MC9S08PA4 of wait mode question

Jump to solution
840 Views
kriske
Contributor II

As the MC9S08PA4 Reference Manual show

 

10.4.2 Wait mode

The WAIT instruction enables interrupts by clearing the I bit in the CCR. It then halts the clocks to the CPU to reduce overall power consumption while the CPU is waiting for the interrupt or reset event that will wake the CPU from wait mode. When an interrupt or

reset event occurs, the CPU clocks will resume and the interrupt or reset event will be processed normally.

 

 

So, if I into to Wait/STOP mode, just give it a interrupt even that will wake the CPU from wait/STOP mode.

 

I have try to set MC9S08PA4 into STOP mode, and it can work, and use KBI to trigger interrupt to return RUN mode are work normal.

 

Run Mode

92774_92774.JPGDSC_0495.JPG

 

 

STOP3 mode

92638_92638.JPGDSC_0494.JPG

 

 

If I set  MC9S08PA4 into wait mode, it can work.

But I use KBI to trigger interrupt back to Run are fail, still in wait mode.

 

Wait mode

92775_92775.JPGDSC_0497.JPG

 

 

When KBI even happen

92776_92776.JPGDSC_0496.JPG

 

 

 

Is there something I have missed at wait mode?

 

 

I set after 3.5s to into wait mode

 

 

void TI1_OnInterrupt(void)

{

  /* Write your code here ... */

  //Cpu_SetStopMode();

  KBI0_SC_KBACK=1;

  FTM0_SC_TOIE=0;

  Cpu_SetWaitMode();

}

 

 

 

 

and I use KBI interrupt to return Run mode

 

 

 

 

ISR(Wait_interrupt)

{

  wait_Flag=1;

 

  KBI0_SC_KBACK=1;

  FTM0_SC_TOIE=1;

  //FTM0_SC_CLKS=1;

}

Original Attachment has been moved to: 9S08PA_ADC_FIFO_SOFT.zip

Labels (1)
0 Kudos
1 Solution
503 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Hi Kris

Please check the attached file, also I already sent it through the SR that you created

I hope this will help you.

View solution in original post

0 Kudos
1 Reply
504 Views
vicentegomez
NXP TechSupport
NXP TechSupport

Hi Kris

Please check the attached file, also I already sent it through the SR that you created

I hope this will help you.

0 Kudos