Question about the can wake up the mcu from stop mode

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

Question about the can wake up the mcu from stop mode

ソリューションへジャンプ
2,016件の閲覧回数
zhanhui
Contributor II

Hi, DEAR NXP AE team

          Now i am using the S12ZVC to development project,and the CAN is work well in transmit and receive the can message.

         I need to S12ZVC enter to the stop mode and the S12ZVC need to wake up by the can message and the KL15(12v) ,I use the HVI pin connect the KL15(12V),and use the hvi(PTL) pin interrupt to wake the mcu from the stop mode is ok .

        But the can message(can wake frame ) can wake the mcu.1、For the MSCAN,i set the  WUPE=1 in the CANCTL0 register,and enable the WUPIE =1 in the CANRIER register, 2、then for the CAN PHY ,i set the WUPE1-0 =10, but when the mcu enter stop mode,it can' wake form the stop mode by the can message.

       can you help me to solve this promble ,Is there any place I did not notice?

0 件の賞賛
1 解決策
1,435件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Does MSCAN module enter Sleep mode?
The MSCAN wakeup interrupt can only occur if the MSCAN is in sleep mode (SLPRQ = 1 and SLPAK = 1) before entering Stop mode.

CANCTL0_SLPRQ = 1;         // MSCAN sleep mode request 
while(CANCTL1_SLPAK == 0); // wait for acknowledge of sleep mode

Regards,
Daniel

元の投稿で解決策を見る

7 返答(返信)
1,436件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Does MSCAN module enter Sleep mode?
The MSCAN wakeup interrupt can only occur if the MSCAN is in sleep mode (SLPRQ = 1 and SLPAK = 1) before entering Stop mode.

CANCTL0_SLPRQ = 1;         // MSCAN sleep mode request 
while(CANCTL1_SLPAK == 0); // wait for acknowledge of sleep mode

Regards,
Daniel

1,435件の閲覧回数
zhanhui
Contributor II

Daniel,tanks!now it can wake by the can message。One more question,when i enter the  Pseudo Stop Mode (PSTP = 1 and OSCE=1) ,it can wake up。But in the Full Stop Mode (PSTP = 0 or OSCE=0) ,it can’t,why,can you help me .thank you.

0 件の賞賛
1,435件の閲覧回数
zhanhui
Contributor II

when the mcu wake up ,is the code is reset to run?i think may in the full stop mode ,the mcu is wake ,but the mcu not run the code in normal, so i think it didn't wake .Is the clk init should reinit or do sometings,the mcu can run normal.

0 件の賞賛
1,435件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Please measure Bus clock on ECLK (PT7).

ECLKCTL_NECLK = 0;

 

Yes, you need to enable the external oscillator again and lock PLL.

Otherwise, it is clocked from the internal IRC1M.

 

Regards,

Daniel

0 件の賞賛
1,435件の閲覧回数
zhanhui
Contributor II

Hi Daniel.

          Sorry for my reply to you late。

          If i want to consume minimum current in the stop mode , I let S12ZVC enter into the full stop mode,and use the ADC0_stop_current_workaround() (The ADC high current  in the stop mode), Is there anything else I should pay attention to?  like how  to set the IO status or the other things?

           Thanks!

0 件の賞賛
1,435件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,
There is nothing similar to the ADC problem.
The IOs maintain the states in the stop mode. So, that’s up to you and your application.
Make sure none of the pins is floating in the stop mode.
Please refer to AN4867 Hardware Design Guidelines for S12ZVC, Section 10 Unused pins.

Regards,
Daniel

0 件の賞賛
1,435件の閲覧回数
zhanhui
Contributor II

Is there some body can help me ?thanks!

0 件の賞賛