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 doesn't work after power cycle when INT3 enabled

I have an application using TMS320x28069x processor. when the bits for INT9 and INT3 art both enabled, if I run the code by debugging from code composer, the card responds to CAN messages. If I power cycle the board, it does not respond. If I don't enable INT3, it responds when debugged as well as after a power cycle.

What's up with this?

IER = 0x0100; /* GOOD */

IER = 0x0100 | 0x0004; /* VERY BAD */

  • Hi Charles,

    charles saperstein said:
    IER = 0x0100 | 0x0004; /* VERY BAD */

    Is this a valid implementation?

    Try: IER = 0x0104;

    Regards,

    Gautam

  • same results. I am going to try to build a simple project that will demonstrate the issue.

  • charles saperstein said:
    same results. I am going to try to build a simple project that will demonstrate the issue.

    Sure, do keep us informed. Do try this out too:

    IER |= M_INT3;                              // Enable CPU INT3

    Regards,

    Gautam

  • I think I am getting an Illegal Operation TRAP. I don't get it while debugging. Only on a power up. How can I debug this?

  • charles saperstein said:
    I think I am getting an Illegal Operation TRAP. I don't get it while debugging. Only on a power up. How can I debug this?

    Are you using both these statements?

    IER = 0x0100;
    IER |= M_INT3;

    If so, try using both in the later format and not in hex.

    Regards,

    Gautam

  • Hello

    I'm facing a similar problem with the F28069 on a experimenters kit. When i start the application with the debugger then the ecan module creates the interrupts.


    But when i do a power cycle on the experimenters kit the can part does not work. No interrupts get triggered.

    Was there a solution for the above mentioned problem?

    Thanks

    Philippe

  • When a project would run fine with the emulator connected, but not without it, it generally points to initialized constants in RAM (which would load fine via the emulator, but not in standalone mode like running out of flash). Some steps to debug the issue:

    1. Write a simple test case to transmit a frame out of the eCAN module. Program it in flash. Note that such a test case will  attempt to transmit data out of the CANTX pin, even if another node is not present in the network. Even though this would result in an ACKE, the transmitting node would keep retrying forever. Monitor the CANTX pin with an oscilloscope. if this test runs fine, it confirms that the CAN hardware is good.
    2. In order to generate  an interrupt, successful transmission/reception has to occur, which implies at least one more node on the network.
    3. App.note SPRA876 on the TI website illustrates some simple examples for CAN programs that leverage interrupts. Although written for the F2812 device, the eCAN module is common between that device and the 28069. If the header file information is C source, these programs should run on the 28069 as well.

  • The problem was indeed in the linker command file. The VECTOR section was missing and one Flash section had the same start address as another flash section. After correcting this the CAN driver started as expected after a power cycle.
    Thanks for your support.
    Philippe