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.

TMS320F280039: The timestamp for CAN-FD.

Part Number: TMS320F280039
Other Parts Discussed in Thread: C2000WARE

Hi champs,

In TRM, we say for CAN FD operation mode the MCAN core requires an external timestamp counter.

Does this mean MCAN cannot use the integrated 16-bit wrap-around counter, and need another counter for timestamp generation when working for CAN FD function?

If this is the case, how should we link CPU timer as the timestamp counter for MCAN, for example CPU timer1?

Thanks and regards,

Luke

  • Luke, 

    Does this mean MCAN cannot use the integrated 16-bit wrap-around counter

    It can use the integrated counter, but for the data speeds in CAN-FD communication, BOSCH (creator of the MCAN ip) suggests using the external counter instead. 

    If this is the case, how should we link CPU timer as the timestamp counter for MCAN, for example CPU timer1?

    There is already a provision to substitute the integrated CAN bit time counter with the external counter. This can be done by setting the timestamp select source in the MCAN_TSCC register to external timestamp counter. (TSS)

    There is a developed example on how to use timestamping that will be available in the next version of C2000ware. 

    Thanks.  

  • Hi Sahil,

    I know we can select the source in the MCAN_TSCC register to use external timestamp counter, but how should we link this external timestamp counter to specific timer? For example, CPU timer 0 or timer 1?

    If we use external timestamp counter, when MCAN receives or transmits data frame, the external counter value will be captured into timestamp field of element data(RX buffer, TX event FIFO, etc), is it correct? However, CPU timers are 32-bit timers and the timestamp field is a 16-bit width field, what's the benefit to use the external timestamp counter please?

    Thanks and regards,

    Luke 

  • Hi Sahil,

    I think I understand this now, please correct me if anything wrong.
    The external 16-bit timestamp counter(not internal one) is still built-in MCAN module, it is clocked by MCAN_ICLK and supports a 24-bit prescaler, this supports up to around 9110 seconds (with 120MHz MCAN_ICLK and 0xFFFFFF prescaler) counting period before this counter overflow.

    Since this 16-bit timestamp is in MCAN, we can use it directly and no need to use CPU timers for timestamp function.

    Is it correct?

    Regards,

    Luke

  • Since this 16-bit timestamp is in MCAN, we can use it directly and no need to use CPU timers for timestamp function.

    That is accurate. 

    Thanks.