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.

CCS/TMS320F28035: CAN Rx Interrupt not coming after Bootloading the application

Part Number: TMS320F28035

Tool/software: Code Composer Studio

Hi,

I'm currently working on development of can bootloader for TMS320f28035.

CAN Bootloader code is located in Flash Sector A and my application is getting bootloaded to Flash Sector B through can bootloader.

But after bootloading ,CAN messages are transmitted by code but no can rx interrupt is getting generated.

When instead of bootloading same application , i am directly debugging the application and running it through JTAG then can rx interrupt is getting generated.

I am bit lost as to why can rx interrupt is shutting off after application is getting bootloaded?  

  • Siddharth,

    Are you saying the same code works from RAM (when loaded/ debugged via the JTAG connector), but not from flash (after it was programmed thru the bootloader)? If so, does it work properly when you program it in flash via JTAG?

    Is your message actually received in the receive mailbox? Can you check if the corresponding RMP bit it set? If it is, then it is fairly straightforward to debug. All you need to do is to follow the "interrupt chain" all the through to the INTM bit in the core. Please see the examples in my app.note SPRA876A.

    VERY IMPORTANT: All reads/writes to the eCAN control registers need to be 32-bits. Don't forget this.

  • I meant to say same code works from same Flash Sector B when i am debugging from CCS via JTAG.

    So following are my observations related to Registers of CAN and PIE peripherals after bootloader code jumped to application code from bootloader:-

    1) PIECTRL Register (storing last fetched interrupt address) is showing can interrupt address location(0xDCB) as soon as code jumps to application even no can message is sent by me.

    2) RMP register is empty initially but when i am sending some can message it is getting changed but not getting cleared as interrupt routine is not getting executed.

    So as per observations what i am getting the problem is can interrupt is getting enabled initially due to some source even though no can message is received by application.It is very strange why it is occurring only when application is bootloaded not when it is debugged via JTAG into same Flash Sector B.

  • So, the same .out file works fine when it is flashed through CCS+JTAG, but does not work when it is programmed in the flash through your boot-loader?

     

    Does the CAN bootloader code use interrupts? If so, it may be leaving the CAN module in a state wherein it does not take any more interrupts. Please check the interrupt example in SPRA876A. It clearly shows all the bits/registers involved in generating interrupts. You should be able to trace the problematic bit (in the situation where a received message sets RMP, but does not trigger interrupts).