MC9S08PA4 of wait mode question

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

MC9S08PA4 of wait mode question

ソリューションへジャンプ
1,023件の閲覧回数
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

ラベル(1)
0 件の賞賛
返信
1 解決策
686件の閲覧回数
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 件の賞賛
返信
1 返信
687件の閲覧回数
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 件の賞賛
返信