CCS/TMS320F28379D: initCLA1 in TMS320f28379D

Intellectual 340 points

Replies: 3

Views: 51

Part Number: TMS320F28379D

Tool/software: Code Composer Studio

I try to init CLA but when my program go to line 46 in below picture ; it jume to illegal interrupt and i can debug this ; please help me

thank and best regard !

my code!400Hz_NPC_CAN_BANG_TU.rar

3 Replies

  • Anh,

    There is nothing obvious about the line you highlighted that should cause an illegal trap.  Please try the following:

    • Comment out the breakpoint (ESTOP0 instruction) and the for(;;); loop.  Step through the ISR and return.  Where does the PC return to?  Is it where you expected?  If not, where did it end-up?
    • In the ISR inspect the stack - you should see values that align to the following.  Does the return address on the stack look correct?  Is the location of the stack where you expect? (see next question)
      Return Addr
      empty  < SP points here (even or odd address)

    • Does the stack overlap with any program memory?  Check the memory linker file (.cmd) and map file (.map)
    • Provide a screenshot of the disassembly window near the location where the ITRAP occurs (setting the CLA registers).  Does the disassembly seem reasonable for the C code?  This will tell if the RAM has been corrupted.



    Lori Heustess
    C2000 Software Engineering

  • In reply to Lori Heustess:

    Dear Lori;

    -When 1 comment out Estop and for(;;) loop PC come to TIMER1_ISR() like first picture below.

    -sorry i dont understand your ideal about ( ISR inspect the stack)

    - I see linker cmd  and map file but I cant find any thing wrong.

    -in second picture below ; the illigeal interrupt occor when I step into line 46

    Thank you very very much;

    Tuan Anh

  • In reply to anh nguyen:

    anh nguyen
    -in second picture below ; the illigeal interrupt occor when I step into line 46

    I think you mean line 40 or 41?

    Line 40 is assigning the LS4 memory block to the CLA but it is also the memory block that the C28x is fetching opcodes from (i.e. C28x program is running from 0xa1b9 which is LS4 - refer to the memory map in the device datasheet).  

    Refer to the information for local shared RAM and the CLAPGM bits (section Local Shared RAM (LSx RAM) of the TRM).  I believe for the configuration you have LS4 is only available to the CLA and no longer available to the C28x for code execution.  Thus when the next instruction is executed the C28x takes an illegal trap.



    Lori Heustess
    C2000 Software Engineering