Bastian Heid

S12XEP100 CAN problem

Discussion created by Bastian Heid on Nov 19, 2012
Latest reply on Nov 19, 2012 by John Dammeyer

I have a problem with a MC9S12XEP100CAG:


- CAN2 (PM4/PM5) works fine

- CAN0 (OM0/PM1) CAN1 (PM2/PM3), CAN3 (PM6/PM7) doesn't work.


The Init sequence of CAN2 and CAN0/CAN1/CAN3 is the same (see below).

CAN2 goes synchron, I can send and receive messages.

But CAN0/CAN1/CAN3 doesn't work, the CAN-bus doesn't go synchron. Transceivers are enabled (same configuration as CAN2).


I hope anybody can help.







CAN2CTL0 = 0x01;

   while ((CAN2CTL1 & 0x01) != 0x01)




   CAN_HS_SetBRP (0x07);

      CAN_HS_SetSJW (c_HS_ReSyncJumpWidth);

   CAN_HS_SetPHS1 (c_HS_TimeSegment1);

   CAN_HS_SetPHS2 (c_HS_TimeSegment2);


   CAN2CTL1 = 0x80;




   CAN2CTL0 = 0x00;


   while ((CAN2CTL1 & 0x01) == 0x01)




   CAN2RIER = 0x01;