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: Correct setting on the bit parameters

Part Number: TMS320F28388D
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Hi Team,

Can you please help with our customer's inquiry below?

I have tried the MCAN on F28388D, and the bit timing parameters for the 5Mbps data rate setting does not work on Canoe, so I need to ask if Ti can provide the correct setting on the bit parameters.
Please refer to the timing parameters in the attached screenshot, the canoe application on PC receives the CAN FD frames ( maybe my settings in the MCANConfig bit.times parameters are not right) but reports that the received frame has error, or bit stuff error, or CAN frame overload. what could be the reason?

Regards,

Danilo

  • Please download the latest version of C2000ware and try the Driverlib examples

  • Hi Hareesh,

    Thank you for your response. Please see the feedback of our customer below.

    Please refer to the below screen shot, let me be more clear and precise this time, I have updated the c2000ware, used the driverlib mcan transmit example from here, and also updated the new sysconfig,it compiles well and also I am able to see the canfd frame without any error when I am using the default settings from the example used for 500 kbps nominal bit rate and data bit rate of 1Mbps,

    Now due to our project requirement I need to use CANFD with at least 5 Mbps, for this I have modified the highlighted section in the screenshot , and tried to send the frames with data rate of 5 Mbps, but eventually the CANFD frames seen on the CANoe application gives error as u can se in the screen shot, what could be the reason for this, could Ti provide the correct bit timing parameters for this setting,or what do you think has gone wrong here.
    thank you very much in advance for you reply

    Regards,

    Danilo

  • Your values are incorrect. Try the below:

    //
        // Configure the divisor for the MCAN bit-clock
        //
        SysCtl_setMCANClk(SYSCTL_MCANCLK_DIV_2); // This should give you 100 MHz input to the MCAN module
    
    
        //
        // Initialize bit timings.
        //
        bitTimes.nomRatePrescalar   = 0x4U; // Nominal Baud Rate Pre-scaler.
        bitTimes.nomTimeSeg1        = 0x9U; // Nominal Time segment before SP
        bitTimes.nomTimeSeg2        = 0x8U; // Nominal Time segment after SP
        bitTimes.nomSynchJumpWidth  = 0x8U; // Nominal SJW
        bitTimes.dataRatePrescalar  = 0x0U; // Data Baud Rate Pre-scaler.
        bitTimes.dataTimeSeg1       = 0x9U; // Data Time segment before SP
        bitTimes.dataTimeSeg2       = 0x8U; // Data Time segment after SP
        bitTimes.dataSynchJumpWidth = 0x8U; // Data SJW
    

    Note: These values offer you 1 Mbps & 5 Mbps in theory. You may need to tweak the values for your network parameters. This includes TDCO.

    Refer to www.ti.com/lit/SPRACU9 for debug tips.

    Refer to www.ti.com/lit/SPRACE5 for bit-timing calculation examples (page 15). Note that this app.report is for the DCAN module, not MCAN. Nevertheless, the computation is exactly identical. 

    You can also try the SYSCONFIG tool.

  • Download the latest version of CCS (12.2.0) and C2000Ware (4.03). Import any MCAN project from C:\ti\c2000\C2000Ware_4_03_00_00\driverlib\f2838x\examples\c28x\mcan, preferably one with SYSCONFIG support built-in already. You can open the bit-timing calculator through the SYSCONFIG tool.