AnsweredAssumed Answered

MCF51JM128 MsCAN Bit Timing Problem

Question asked by David Wright on Mar 17, 2011
Latest reply on Mar 24, 2011 by David Wright



I am using AN1798 to calculate my bit timing.  The following are the details of the bus.


Bus Length = 0.4m

Transceiver (NXP, TJA1041) propogation delay = max 255ns

Bit Rate: 125kbps which is well within the capabilities of the transceiver chip


The hardware set up is 3 nodes one is dormant though on the bus and just provides power to the other 2.  Each node uses an MCF51JM128 and an NXP TJA1041.


The following is the bit timing information calculated from AN1798.


BUS CLK (0) or External CLK (1)1
Cable Length (m)0.4
External CLK24000000
BUS CLK12000000
CAN CLK1500000
CAN Bit Rate1.25E+005
tQ per Bit12
Tq per Bit – PROP_SEG – Sync_SEG10
Oscillator Requirements: EQ100.0167
Required Oscillator Tolerance1.6556%


Now using these values data passes onto the CAN_H CAN_L lines.


The system is such that node 1 transmits a message onto the bus and then waits for a reply from node 2 in a do while loop:


      while(SendByte(fourPtr)!=0)  //this is place marker to show me where the code is over the serial port
    (void)CAN_CheckStatusMB( 2, status );  //check buffer 2 status
  while ( status[0] != NEWDATA);    //if data has been received break out of the do while loop
  while(SendByte(fivePtr)!=0)  //this is place marker to show me where the code is over the serial port
  (void)CAN_ReadDataMB(2, dataR);  //read data from buffer 2


Now I'm not sure where to go to from here short of trying every possible bit timing configuration.  I just can't seem to get the silly bus to receive messages can anyone see any issues with my CAN Bit Timing?  Please don't hesitate to ask for further information!