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.

AWR1843BOOST: Set CAN data rate to 500Kbs

Expert 2050 points
Part Number: AWR1843BOOST

I use AWR1843Boost with lab demo mrr. 

In the demo, the CAN bus rate are configured 1Mbps and 5Mbps as nominal and data bit rate respectively. 

I have configured the bus trate 500Kbps and 2Mbps as nominal an data bit rate successfully. 

/*500Kbps NomBitRate: (40)/(((6+5+4)+1)*5)*/
mcanBitTimingParams.nomBrp = 0x5U;
mcanBitTimingParams.nomPropSeg = 0x6U;
mcanBitTimingParams.nomPseg1 = 0x5U;
mcanBitTimingParams.nomPseg2 = 0x4U;
mcanBitTimingParams.nomSjw = 0x1U;

//2 Mbps
mcanBitTimingParams.dataBrp = 0x4U;
mcanBitTimingParams.dataPropSeg = 01U;
mcanBitTimingParams.dataPseg1 = 0x2U;
mcanBitTimingParams.dataPseg2 = 0x1U;
mcanBitTimingParams.dataSjw = 0x1U;

But I could not successfully configure the data bit rate to 500Kbps. Can you advice how to configure data bit rate to 500Kbps?

Thanks

  • Hello Lei,

    Are you using the CAN at 40 Mhz or 80 Mhz? According to your calculation it is using 40.
    Could you send me the formula you are using for this calculation?

    Regards,
    Saswat Kumar

  • Thank you very much. Yes, using 40Mhz.

    /*500Kbps: (40)/(((6+5+4)+1)*5)*/
    // mcanBitTimingParams.dataBrp = 0x5U;
    // mcanBitTimingParams.dataPropSeg = 0x6U;
    // mcanBitTimingParams.dataPseg1 = 0x5U;
    // mcanBitTimingParams.dataPseg2 = 0x4U;
    // mcanBitTimingParams.dataSjw = 0x1U;

  • What rate are you observing when you configure it for 500 Kbps?

  • hi Saswat, I do not understand your question. Can you please explain it?

  • Hello Lei,

    You have mentioned that when you set it to 500 Kbps, you are not getting expected output, are you seeing the data at a different rate or are you observing any error?

    Regards,

    Saswat Kumar

  • Hi Saswat, 

    When I use below setting for 500Kbps:

    /*500Kbps: (40)/(((6+5+4)+1)*5)*/
    mcanBitTimingParams.dataBrp = 0x5U;
    mcanBitTimingParams.dataPropSeg = 0x6U;
    mcanBitTimingParams.dataPseg1 = 0x5U;
    mcanBitTimingParams.dataPseg2 = 0x4U;
    mcanBitTimingParams.dataSjw = 0x1U;

    I can get the CAN communication work. I use a PCAN app to monitor the data at 500Kbps. 

    Now, I want to set CAN bitrate to 250Kbps I use below setting:

    mcanBitTimingParams.dataBrp = 0x10U;
    mcanBitTimingParams.dataPropSeg = 0x6U;
    mcanBitTimingParams.dataPseg1 = 0x5U;
    mcanBitTimingParams.dataPseg2 = 0x4U;
    mcanBitTimingParams.dataSjw = 0x1U;

    I also set PCAN app to 250Kbps, but app can not receive the message from Radar device. Can you please tell how to set CAN bitrate to 250Kbps?

  • Hello Lei,

    It is not so straightforward to calculate this calue based on your system you can refer the following how to set the values of these registers:

    http://www.ti.com/lit/ug/swru520c/swru520c.pdf

    Section 21.3 "CAN bit timing"

    You will have to keep in account the note as well:

    And then decide the values.
    Please refer the same.

    Regards,

    Saswat Kumar