This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F2812: CAN bit rate configuration

Part Number: TMS320F2812
Other Parts Discussed in Thread: RM57L843, , HALCOGEN

We have to make a TMS320F2812 has to communicate with a RM57L843 via a CAN.

We have succeed to transmit and receive message using 500Kbps. However 1Mbps it does not work.  The RM57L843 does not recognise (it does not set the ACK bit) the TMS320F2812 frame, which keeps re transmitting it and vice-versa. Using the same CAN bus (wiring) two  TMS320F2812 communicate at 1MHz.


We suspect the problem is the bit rate configuration. Could you give advice on how the choose the bit rate configuration paramterers?  Should both CPUs have the same sample point? 

For the TMS320F2812, the clock is 114688000Hz and the value of CANBTC register was proviced by http://www.bittiming.can-wiki.info/ as  Type: eCAN, Clock : 114MHz, max brp : 256, SP : 87.5%, min tq : 8, max tq : 25, FD factor : undefined, SJW : 1

For the RM57L843 the clock is 75Hz and the value the configuration parameters was defined with HALCoGen. For the 1Mbps the tool ignores the value we choose for "SP Ref" and the Sample Point is always set to 90.909.

Thanks.

  • 114688000 Hz is a rather unusual value for SYSCLKOUT. Is there a reason why you are operating at that frequency? Of course, you are at liberty to operate the device at any frequency demanded by your application. However, such frequencies would prevent you from generating the "standard" bit-rates not only for CAN but for any serial peripheral. Almost always, there will be an error in the bit-rate. 

    What you need to do is to have the F2812 and 57L843 transmit and capture the actual bit-time (i.e. the width of 1 bit). This will let you determine the error in the respective bit-rates. 

    Mismatched bit-rates is a very easy way to make a node go bus-off.

    We have succeed to transmit and receive message using 500Kbps. However 1Mbps it does not work.

    This is not surprising. There is more "margin" with lower bit-rates. With higher bit-rates (lower bit-period), the margin is reduced and hence the communication fails.

  • Hello, 

    114688000 Hz  clock is a recommendation of  the hardware team after problems we has with noise. We have no problem with the SCIs at 115200 bps.

    We have used the oscilloscope to capture the signal. The bits for both F2812 and 57L843 seem good with 1 micro second of width.  

    We´ve asked the same question on the Arm-based microcontrollers forum RM57L843: CAN bit rate configuration - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums and the final bit rate for 57L843 computed by the HALCoGen is 974ns.

  • 114688000 Hz  clock is a recommendation of  the hardware team after problems we has with noise.

    OK, I thought as much. EMC is typically why a design may use an odd frequency.

    We have used the oscilloscope to capture the signal. The bits for both F2812 and 57L843 seem good with 1 micro second of width.  

    Is it exactly 1 us? Can you attach a scope capture? 

    Can you also provide the CANBTC value on the2812 side?

  • Hello,

    We have succeed to communicate at 1MHz changing the value of "Propagation Delay" in the 57L843.

    We took pictures of the signal, but didn´t see differences betewen F2812 and 57L843.

    The value of F2812 CANBTC is 0x0005006b.

    Thank you.