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.

C2000 CAN Tx hold at "ECanaRegs.CANTRS.all = 0x0000FFFF;"

Other Parts Discussed in Thread: TMS320F2812, TMS320F2811

HI,

I tried TMS320F2812 CAN example, it always hold at at "ECanaRegs.CANTRS.all = 0x0000FFFF;" seems that Tx can't send out the data or can't get Ack .

Change the "DSP28_ECan.h" to latest file and a little change "DSP28_ECan.c" base on new header file, it can run. Compare the "DSP28_ECan_old.h" and "DSP28_ECan_new.h", can't found what cause the issue. Please see attached file(DSP28_ECan_old.h can't work, DSP28_ECan_new.h can work).

OldNew_ECan.zip

My question is, what difference can cause the "SW Tx hold at "ECanaRegs.CANTRS.all = 0x0000FFFF;" between "DSP28_ECan_old.h" and "DSP28_ECan_new.h"?

Best regards,

Kent

  • Kent,

    Upon review, I didn't see anything between the header files that would affect runtime. What other changes did you perform, anything that wasn't a name change?

    Best Regards
    Chris
  • Chris,

    Yes, I am agree with you, seems that their difference just is name change.  But I copy the CAN demo SW, the SW can't work with old header file, and I use new header file modify DSP28_ECan.c file base on new header file. Just these is change.

    BTW, I found several strange thing, can't understand:

    #1, I have 3 same boards, just one board can do : when I power on the board, first debug(it hold at ECanaRegs.CANTRS.all = 0x0000FFFF), CAN analyer can't get the data, and without power off debug again, CAN analyser can get the data. (The demo SW run ram mode).

    #2, When use latest header file, 3 boards all can work.

    Sorry I didn't introduce the develop condition. I use TMS320F2811 board with CAN and CAN analyser, demo board send out the data, and CAN analyser read data.

    I don't know about CAN communication, if a little possible base on the SW description? Old header file say"/* eCAN Master Control Field (MCF) bit definitions */

    struct  CANMCF_BITS {                // bits  description" but new header file say"/* eCAN Message Control Field (MSGCTRL) bit definitions */

    struct  CANMSGCTRL_BITS {     // bits  description". Master need some special ACK from CAN analyser, but Messsage means don't need  some special ACK from CAN analyser, but CAN don't send special ACK.

    I also attached the demo SW that using old header file.can.zip

  • Kent,

    I apologize for the delay.
    The SW description won't have any effect. Seeing that it can work before and after the header change (and that the header changes are really only naming related), my guess is possibly an issue (maybe timing or bus related) when interfacing with the CAN analyser. Do you have any issues (before header and after), if you setup the project to use CAN loopback?

    Also, here is an eCAN app note.
    www.ti.com/.../litabsmultiplefilelist.tsp

    Best Regards
    Chris