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.

TMS320F28388D: CAN-FD not working at some rate combinations.

Part Number: TMS320F28388D
Other Parts Discussed in Thread: TEST2

Hello.

We are starting development on a 28388D Controlcard and testing the MCAN module.

We are using a Peak CAN-FD to check the outputs.

Timings are calculated with MCAN_BitTimingCalculator.xls from TI:

Testing some configurations using "mcan_ex9_transmit.c":

Test1 (works):

    bitTimes.nomRatePrescalar   = 3U;  // Nominal Baud Rate Pre-scaler. 500Khz
    bitTimes.nomTimeSeg1        = 11U;  // Nominal Time segment before SP
    bitTimes.nomTimeSeg2        = 6U;   // Nominal Time segment after SP
    bitTimes.nomSynchJumpWidth  = 6U;   // Nominal SJW

    bitTimes.dataRatePrescalar  = 1U;   // Data Baud Rate Pre-scaler. 1Mhz
    bitTimes.dataTimeSeg1       = 11U;  // Data Time segment before SP
    bitTimes.dataTimeSeg2       = 6U;   // Data Time segment after SP
    bitTimes.dataSynchJumpWidth = 6U;   // Data SJW

Test2 (works):

    bitTimes.nomRatePrescalar   = 1U;  // Nominal Baud Rate Pre-scaler. 1Mhz
    bitTimes.nomTimeSeg1        = 11U;  // Nominal Time segment before SP
    bitTimes.nomTimeSeg2        = 6U;   // Nominal Time segment after SP
    bitTimes.nomSynchJumpWidth  = 6U;   // Nominal SJW

    bitTimes.dataRatePrescalar  = 0U;   // Data Baud Rate Pre-scaler. 2Mhz
    bitTimes.dataTimeSeg1       = 11U;  // Data Time segment before SP
    bitTimes.dataTimeSeg2       = 6U;   // Data Time segment after SP
    bitTimes.dataSynchJumpWidth = 6U;   // Data SJW

Test3 (doesn't work):

    bitTimes.nomRatePrescalar   = 3U;  // Nominal Baud Rate Pre-scaler. 500Khz
    bitTimes.nomTimeSeg1        = 11U;  // Nominal Time segment before SP
    bitTimes.nomTimeSeg2        = 6U;   // Nominal Time segment after SP
    bitTimes.nomSynchJumpWidth  = 6U;   // Nominal SJW
    
    bitTimes.dataRatePrescalar  = 0U;   // Data Baud Rate Pre-scaler. 2Mhz
    bitTimes.dataTimeSeg1       = 11U;  // Data Time segment before SP
    bitTimes.dataTimeSeg2       = 6U;   // Data Time segment after SP
    bitTimes.dataSynchJumpWidth = 6U;   // Data SJW

We don't understand why 500K/2M combination does not work as the other two are using exact same timing values.

Is there anything we are not taking in account ?

Than you,

Samuel

  • Samuel,

                  It is indeed strange that Test 2 is working (Nominal bit-rate 1 Mbps, Data bit-rate 2 Mbps), but Test 3 with a lower nominal bit-rate of 500 kbps is not working. 

    • Exactly what error are you getting for Test3?
    • Perhaps your sampling point is too early, Can you please try the following for Test3:

       bitTimes.nomRatePrescalar   = 3U;  // Nominal Baud Rate Pre-scaler. 500Khz

        bitTimes.nomTimeSeg1        = 14U;  // Nominal Time segment before SP

        bitTimes.nomTimeSeg2        = 3U;   // Nominal Time segment after SP   

        bitTimes.dataRatePrescalar  = 0U;   // Data Baud Rate Pre-scaler. 2Mhz

        bitTimes.dataTimeSeg1       = 14U;  // Data Time segment before SP

        bitTimes.dataTimeSeg2       = 3U;   // Data Time segment after SP 

  • Hello Hareesh.

    We are not getting any error in the CAN analizer, we simply don't see any frame.

    It seems indeed something related with sampling point as after testing with the timings you provided it started to work.Then we changed the "sampling point" percentage in the CAN analizer from 80% to 65% and then started to work also with our original tests.

    I am taking a look to the spreadsheet and it tends to generate timings with low sampling point percentage (60~65%). As far as I know it is preferred to be around 75~80%. Is that correct ?

    I will try to modify the spreadsheet to be able to obtain better values from it.

    Thank you for your help,

    Samuel.

  • Samuel,

             The exact sampling-point to be used is completely dependent on your network parameters such as bus length, round trip propagation delay introduced by the transceivers and the accuracy of the oscillator.

    Even if your timing parameters are not optimal, you should see data coming out of the CANTX pin.

    Please do let me know if you find any issues with the spreadsheet.