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.

TMS320F28069: Output Timestamp and Output Status functionality not working in CAN unpack block for C2000 embedded blockset

Part Number: TMS320F28069


While trying to get the Timestamp & status information from the CAN unpack block, always we are getting the same value

  • My Application report http://www.ti.com/lit/spra876 has a tested examples for timestamp counter. However, I think your question pertains to Simulink. Please reach out to Mathworks forum for Simulink support.

  • Hi Hareesh

    I was able to update the Timestamp value in the Simulink CAN Unpack block using the CANTSC register value. 

    myModel.eCAN_Receive_SS0_SS2_o2.Timestamp = (double)ECanaRegs.CANTSC;

    Reading through the data sheet is seems like CANTSC can be updated every time the CAN transceiver receives a message OR I can tie CANTSC to one specific mailbox. This means that CANTSC will update either for ALL frames on update for a single frame in a specific mailbox.

    Is there a way to get individual timestamps for each frame ID that my micro is receiving? I want to calculate the delta times in receiving message for each frame ID.  

    If no register exists out of the box to do what I want, is there a way to trigger an interrupt each time the micro receives a frame to update a delta time table I create? 

  • Reading through the data sheet is seems like CANTSC can be updated every time the CAN transceiver receives a message

    CANTSC is a free running counter that is incremented at the rate of the bit-clock.

    OR I can tie CANTSC to one specific mailbox.

    CANTSC is not tied to any particular mailbox. The value of CANTSC can be captured in the corresponding MOTS register for a configured MBX when a Tx or Rx event completes.

    This means that CANTSC will update either for ALL frames on update for a single frame in a specific mailbox.

    As mentioned before, it is a free-running counter. It doesn’t know or care about any mailbox.

    Is there a way to get individual timestamps for each frame ID that my micro is receiving?

    You don’t get timestamps for a specific MSGID. Timestamps are captured for configured mailboxes.

    I want to calculate the delta times in receiving message for each frame ID.  

    Yes, this can be done.

    If no register exists out of the box to do what I want, is there a way to trigger an interrupt each time the micro receives a frame to update a delta time table I create? 

    All resources are already available in the module. Please refer to the example in my Application report http://www.ti.com/lit/spra876.