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.

eCAN Transmit Acknowledge bit (TA)

Other Parts Discussed in Thread: TMS320F28335

Hi,

I'm using TMS320F28335 DSP controller.

I'm using the eCAN module and I have a strage bug that looks like a reported errata.

Errata: http://www.ti.com/lit/er/sprz272g/sprz272g.pdf , eCAN: Abort Acknowledge Bit Not Set

My problem seems to be the same described in the errata but instead to be when TRR is set it is when TRS is set.

I noticed that sometimes when I set TRS to transmit a message, it is cleared and TA is not set.

Here's the code that I used to find the problem:

ECanaShadow.CANTRS.all = 0;
ECanaShadow.CANTRS.bit.TRS16 = 1; //Set TRS for mailbox
ECanaRegs.CANTRS.all = ECanaShadow.CANTRS.all;

do
{
      ECanaShadow.CANTA.all = ECanaRegs.CANTA.all;
}while(!ECanaShadow.CANTA.bit.TA16); //Wait for TA16 bit to be set

Does anyone encountered this problem?

Any suggestion ?

Thanks

  • Luna,

    There are no errata regarding the Transmit Acknowledge bit.  The Abort Acknowledge is completely different.

    The CANTA bit is set when a message is successfully transmitted. Do some reading on CAN communication and you will find that there is actually a Acknowledge bit in every message that is sent that must be asserted by another device on the bus other than the device transmitting the message.  When your F28335 sees this bit asserted it will then assert the CANTA bit.

    I suspect you have this setup on a bench without a connection to another real CAN device setup at the same baud rate and that you are just looking at the output of the transceiver with a scope.  Am I close?  That won't work.  You need an actual CAN bus with termination before you will see the CAN peripheral behave as specified.

    Hope that helps,

    Trey

  • Hi Trey,

    You are not too far, I'm actually on a bench but I'm using the STM bit to test my code. I assume that the self-test mode handle correctly the acknowledge bit. 

    I'm able to transfert a couple of frame and then I'll stuck in the do while loop.

    Maybe I can wait to get the full system to confirm the bug, but I was wondering why I got this problem in a controlled envrionnement (self-test mode).

    Thanks

  • Ok, gotcha.  I'm honestly not too sure how the TA bit behaves in loop back mode.

    I would wait till you get to where you can use a real CAN bus.  The CAN hardware on this part is rock solid and used in many automotive applications without issue.  I think you'll see that the TA bit is set as specified once you're on a real CAN bus.

    Trey

  • Ok thanks I'll wait to get the full system.

  • HI Trey,

             The state of flag ECanaShadow.CANTA.bit.TA25 cannot be changed.I send  the message from DSP to USBCAN by  the " ecan_a_to_b_xmit " program,which is connected with computer. I can see the message which is sent by DSP,  but  the flag  ECanaShadow.CANTA.bit.TA25 cannot be set 1.