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.

TMS320F280049: CAN message TX fail

Part Number: TMS320F280049
Other Parts Discussed in Thread: C2000WARE

Hello Expert,

 

Our customer is now evaluating the CAN interface on F280049.

They recognized they can dynamically change the TX object by referring "26.12.5 Changing a Transmit Object" in TRM.

Actually, they used CAN_setupMessageObject() for the message setup , then use CAN_sendMessage() for sending which  are from C2000 ware library.

They looped this sequence , setup and send, repeatedly, then sometimes TX was not sent which means CAN Analyzer did not receive the data.

Are there the actual result which this type of sequential TX  was well performed with no issue?

They did not think that they need the confirmation of  some flag out side the functions before the TX,

but if there is something to consider in such a TX loop , please advice.

Reards, A.Fujinaka  

  • Hi Akihiko Fujinaka, 

    Please describe the entire target environment (which board?, C2000Ware version, which example etc.,)  and customer objectives with CAN.  Please take a look at this application note as well.  http://www.ti.com/lit/an/spra876b/spra876b.pdf   

    Thanks,

    Krishna

  • Hello Krishna,

    Here I received the answers.

     target environment: 

    which board?: Customer deisgned board

    C2000Ware version:  2_00_00_02

    which example:  No example becuase customer original source code refeed can_ex3_external_transmit.c .

    Their code send CAN data every 5msec using mailbox assinged different ID every time.

    Regards, A.Fujinaka

  • If the message object is modified before the message TX is started, the new message is what is attempted to tx next. That means, if there are multiple nodes in the network and this node failed arbitration and failed to tx the message before the object is modified with new ID/data, the old ID/data in the message object is discarded. If needed, wait for the TX event before updating the MBOX.

  • Hello , Thanks for your feedback.

    So, they should enable the TXInterrupt by "TxIE" set to "1" and wait for "IntPnd" turns to "1" showing successful transmission? 

  • Hi Akihiko Fujinaka, 

    Have you been able to look at the application note and resolve your issue.  I will close this ticket based on that assumption.  Please re-open this issue or submit a new one if you need further assistance. 

    Cheers!

    Krishna

  • Hello Krishna,

    I communicated with my customer engineer and proposed to test with TxIE enable and wait for IntPnd bit check before sending the next object.

    However, they don't want to add the TX interrupt handler because they are not using TX interrupt in their code now.

    Are there any correct sequence of document or decsription to send  the object with CAN_sendMessage() after CAN_setupMessageObject().

    Is this IntPnd bit check  necessary for the  sequential object sending? If that's the TI recommendation and only way, they might try to use TX INT handler.

    Regards , A.Fujinaka

  • Hello expoerts,

    Do you have any feedback on this question?

    My customer is staill waiting for our reply.

    Regards, A.Fujinaka

  • Hi Akihiko Fujinaka,

    I have consulted with the domain expert and he will be responding to you today.  Cheers! Krishna

  • Fujinaka-san,

                Please have customer take a look at my app.note http://www.ti.com/lit/sprace5 ,if they have not already. How does the code ensure completion of the previous transmission before initiating the next transmission? (Joe Josn makes a good point. Kindly read his post carefully). If customer does not want to use interrupts (for whatever reason) and if this is the only mailbox that is transmitting, you could simply poll the TXOK bit in the CANES register. See CAN_EX4_SIMPLE_TRANSMIT project in my application report, for an example. Code snippet below:

            //
            // Poll TxOk bit in CAN_ES register to check completion of transmission
            //
            while(((HWREGH(CANA_BASE + CAN_O_ES) & CAN_ES_TXOK)) !=  CAN_ES_TXOK)
    		{
    		}
    

    If there are multiple mailboxes that are transmitting, then a different method has to be used.