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

Hi

 

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
Tprop_delay_cable2.000E-009
Tprop_delay_transceiver2.500E-007
Tprop_seg5.040E-007
External CLK24000000
BUS CLK12000000
Prescaler16
CAN CLK1500000
tQ6.67E-007
CAN Bit Rate1.25E+005
tQ per Bit12
PROP_SEG1
Tq per Bit – PROP_SEG – Sync_SEG10
PHASE_SEG15
PHASE_SEG25
RJW4
Oscillator Requirements: EQ100.0167
EQ110.0166
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:

 

 do
  {
    if(j==0)
    {
      while(SendByte(fourPtr)!=0)  //this is place marker to show me where the code is over the serial port
        {
        }
    }
        
    j++;
        
    (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!

Outcomes