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: How to trouble shoot an illegal ISR

Part Number: TMS320F280049

Hi expert,

We saw CPU get into illegal ISR when initiating some table in RAM. No stack overflow is witnessed at this point (check from memory browser). Error occurs when calling ES_bissc_generateCRCTable(BISS_SCD_CRC_NBITS_POLY1, BISS_SCD_CRC_POLY1, bissCRCtableSCD); which belongs to BISS-C slave example project.

Do you have any advices for trouble shoot this issue?

Thanks

Sheldon

  • Sheldon,

    Those functions populate the CRC Tables with values. Things to look into:

    • Could the table be overlapping with code and thus corrupting it?
    • Check the memory map file (.map) to see if the region where the table is overlaps another section. “page 0” and “page 1” memory is the same physical memory on the device so writing to one can corrupt the other.
    • Another option is to step through the code to see where things go wrong and debug from there.

    Best Regards

    Lori

  • Hi Lori,

    These two tables reside in page one .ebss section and seems no conflict with other part or the code. Could you check the parameter we are passing has any issue?

    #define BISS_SCD_CRC_SIZEOF_TABLE 256 //!< Size of the Single Cycle Data (SDC) CRC table
    #define BISS_SCD_CRC_NBITS_POLY1    6 //!< Number of bits in the Single Cycle Data (SDC) CRC
    #define BISS_CD_CRC_SIZEOF_TABLE  256 //!< Define the size of the Command Data (CD) CRC table
    #define BISS_CD_CRC_NBITS_POLY1     4 //!< Number of bits in Command Data CRC
    #define BISS_SCD_CRC_POLY1             0x03  
    
    ///
    
    uint16_t bissCRCtableSCD[BISS_SCD_CRC_SIZEOF_TABLE];
    uint16_t bissCRCtableCD[BISS_CD_CRC_SIZEOF_TABLE];
    
    ///
    
    ES_bissc_generateCRCTable(BISS_SCD_CRC_NBITS_POLY1, BISS_SCD_CRC_POLY1, bissCRCtableSCD);
    ES_bissc_generateCRCTable(BISS_CD_CRC_NBITS_POLY1, BISS_CD_CRC_POLY1, bissCRCtableCD);

    Thanks

    Sheldon

  • Sheldon,

    The arguments look fine to me.  

    Another debug tip - You can try putting a breakpoint in the Illegal ISR, step through it and see where it returns to.  The location it returns to may have corrupted code. This could give an idea of what is going wrong.  

    Best regards

    Lori

  • Hi Lori,

    The return of illegal ISR seems come to library and no source code. BTW, I didn;t have this directory on my hard disk.

    Thanks

    Sheldon

  • Hi Sheldon,

    I forgot that function is part of the closed library. 

    If you open the disassembly window (view disassembly) you should see where the function is and if it looks corrupted. 

    Are there any ITRAP instructions? 

    The .map file shows the function is running from flash.  Could the code security module be blocking it from execution?

    The screenshot shows that the crc.c function is located in address 0x86... but the linker .map file shows it at 0x82...

  • Updated screenshot in previous post.

  • Hi Lori,

    Thanks for your comments. I have tried veiw disassebly but the window is blank.

    I have reach to you through email.

    Thanks

    Sheldon

  • This was resolved offline. 

    The SARAM block where the code ran was configured as shared between the C28x and the CLA and, at the same time, was configured as CLA program memory.  These are not compatible configurations.  SARAM on this device can be shared as data memory between C28x and CLA, but not as program memory.   This configuration caused the C28x to hit an ITRAP ISR when it attempted to execute code from the block.