mc9s12 CAN wake up fail

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

mc9s12 CAN wake up fail

1,390件の閲覧回数
fupeng
Contributor II
Hi,
    I am using MC9S12xet256 micrcontroller,I use the Processor Expert to create the code.In stop mode, Normally I can wake up it by CAN,but when the AD module added,I can not wake up by CAN.
   Execute the code as follows:
  main.c
for(;;)
{
   AD1_Measure(TRUE);  /*It is possible to delete these two lines*/
   AD1_GetValue16(&advalue);
   if(EnterStopFlag)
   {
      EnterStopFlag = 0;
      /*turn off led*/
      CAN1_SetSleepRequest();
      Cpu_SetStopMode();
      /*turn on led*/
   }
}
   event.c
void CAN1_OnFullRxBuffer(void)
{
   ...
   ...
   if(MessageID == 0x101)
   {
      EnterStopFlag= 1;
   }
   else
   {
      EnterStopFlag= 0;
   }
}
void CAN1_OnWakeup(void)
{
   /* Write your code here ... */
   CAN1_ClearSleepRequest();
}
Can anybody please help me reolve this issue?
 
Regards,
Felix
0 件の賞賛
返信
4 返答(返信)

1,053件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Can you attach the project?

Regards,

Daniel

0 件の賞賛
返信

1,053件の閲覧回数
fupeng
Contributor II

Hi,

   When I don't add AD module,I tried many times stop-> wake up ->stop,at last MCU can not be wake up.

0 件の賞賛
返信

1,053件の閲覧回数
danielmartynek
NXP TechSupport
NXP TechSupport

Hi,

Sorry for the late response.

I have run the project but I don't see any problem.

It always wake up regardless of ADC.

Regards,

Daniel

0 件の賞賛
返信

1,053件の閲覧回数
fupeng
Contributor II
I am grateful for your response.
0 件の賞賛
返信