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.

TMS320F28377D: program stuck when the structure pointer is used as function input

Part Number: TMS320F28377D
Other Parts Discussed in Thread: C2000WARE

Tool/software:

Hi Expert

Customer use CCS6 and v15.12.3.LTS in the legacy project, and find the issue below:

As an example, I claim a structure below:

Structure Example

{

uint_16 Var1

uint_16 Var2 

uint_16 Var3

& Function_handler(& structure) pointer

& Example_instance pointer

}

I use the Structure like this: Eample.Function_handler(Eample.&Example_instance), the MCU may stuck when it jump into this c statement and go to illegal interrupt, but this issue will not be 100% reproduced.

But if I use the Structure like this: Eample.Function_handler(Eample) the MCU works well.

Is there any suggestions to debug this issue?

Thanks

Joe

  • Hi Joe,

    Is there a specific example that you are referencing in C2000Ware? If not, what was the last version of CCS and the compiler this code last compiled successfully in?

    Can you provided more details as to the error message you are observing in the console window.

    Regards,

    Ozino

  • Hi Ozino

    Thanks for your reply, no example is referred and the issue cannot be 100% reproduced at every position when call the function in this way: Eample.Function_handler(Eample.&Example_instance), customer only tries ccs6.2 and v15.12.3.LTS compiler.

    For more details, I try to check the NMI to see what issue brings the program into illegal interrupt, but not NMI flag is set:

    there is also no reset 

    when we look into the disassembly, the program executes the "LCR *XAR7" every time before it stuck

    no error reported at console window.

    thanks

    Joe

  • Can you confirm if your ISRs have been configured correctly. Check out our Interrupt FAQ for more information.

    Can you describe if any source code changes were made prior to migration to this compiler and CCS versions. Do you have a version of the project in a known working state?

  • Hi Ozino

    Could you please attach the Interrupt FAQ link, I cannot find the document directly in ti.com.

    Can you describe if any source code changes were made prior to migration to this compiler and CCS versions.

    Customer does not migrate the code from different version ccs and compiler to 6.2 and 15.12.3, they keep develop their code with the same version IDE and compiler, but come across the issue recently.

    Customer do not tend to share the code externally, so I do not have the project.

    I will look into the FAQ first to see whether I can find some clues.

    Thanks

    Joe

  • here's the link to the interrupt FAQ https://software-dl.ti.com/C2000/docs/c28x_interrupt_faq/html/index.html 

    Can you have the customer create a test scenario of the working code and the broken code. this will help us in being able to replicate this issue on our end. 

    Thanks!

  • Hi Ozino

    Thanks for your reply, I will try to ask customer to narrow down the issue with the document, if they feedback the details and need the further research on this issue, I will open a new thread for discussion.

    Thanks

    Joe