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.

RM57L843: DCAN Timing Configuration - 20Kbit/s

Part Number: RM57L843
Other Parts Discussed in Thread: HALCOGEN

Hi,

I have a RM57L843, I need to communicate to a CANOpen device at 20Kbit/s.

I have a very strange problem with the baud rate prescaler.

  1. Crystal Oscillator is 16MHz, verified by a scope.
  2. VLCKA1 src is set to OSC and therefore VCLKA1 is 16MHz
  3. BRP+1 is 50 calculated as 16Mhz / 50
  4. Tq therefore = 3.125uS
  5. I have a simple setup of 10Tq with SWJ = 1, PROP = 1, T1 =4, T2 = 4
  6. I have compared all these values with the register settings.

I transmit a message from the RM57 and I'm measuring the SOF (Start of Frame) bit with a scope.  The SOF bit is low for 93.75uS (It should be 31.25uS!!).

Can anyone advise how or where a factor of 3x comes from in the clocking scheme?. I'm totally lost as to explain this behaviour.

Thanks

Stomp!

  • Hello,
    Your question is addressed!
    Due to the US holiday the responses may be delayed until the week of November 26th.

    Best regards,
    Miro
  • Hello,

    HALCoGen allows you to generate the bit timing register contents for a given VCLKA1 frequency and the desired CAN bit rate. Can you try using the configuration generated by HCG?

    Also, your calculations are off for a bit rate of 20kbps, as you would need a bit time of 50us. With your configuration, you would get a bit time of 31.25us.

    Regards,
    Sunil
  • Thanks Sunil,

    I think the key for me was the HalCoGen's displayed timing parameters of 1,1,4,4 (=10Tq) is not actually what is used in the CAN timing, as there is an additional box to the right which is the SJW (=3), in my case I was expecting 10Tq, however HalCoGen actually had 1+3+4+4=12Tq.

    Thanks!