Hello,
Thanks in advance for taking the time to read and respond to this....
I am using a TMS320F28335 on CCS 5.3.0.00090 with SYS/BIOS 6.34.2.18.
The project builds fine and runs fine when connected with an XDS100 debugger. If the project has been loaded and started with the debugger attached it runs fine, I can even remove the debugger as long as the program was started with the debugger and I do not reset the DSP.
When I try to boot from flash the project runs fine, except for when I try to use the Flash_Erase or Flash_Write commands which are part of the Flash28335_API_V210.lib. Flash_Read is fine, and the rest of the project is fine. But Flash_Erase and Flash_Write cause:
ti.sysbios.family.c28.Hwi: line 953: E_unpluggedInterrupt: Unplugged interrupt flagged: intr# 19
xdc.runtime.Error.raise: terminating execution
ti.sysbios.gates.GateMutex: line 97: assertion failure: A_badContext: bad calling context. See GateMutex API doc for details.
xdc.runtime.Error.raise: terminating execution
The error occurs when the DSP boots from flash when not connected to the debugger, and can be reproduced by doing a CPU reset through CCS while the connected with the debugger.
I have tried a number of different things from various forum messages such as :
- disabled interrupts using DINT/EINT around Flash_Erase((SECTORH),&FlashStatus)
- disabled interrupts using __disable_interrupts()/__restore_interrupts(intr_state) around Flash_Erase((SECTORH),&FlashStatus)
- doubled stack size from 0x300 to 0x600
- Moved .stack to different (larger and smaller) location in RAM, .stack is the only thing allocated to the block in each case.
- Watched the stack for overruns
- changed and modified the .gel file
None of these proposed solutions from other forum threads seemed to help at all. I don't think the problem has anything to do with running the program from flash, or with any of the steps required to bootload from flash. It seems to be specifically with Flash_Erase and Flash_Write from Flash28335_API_V210.lib when the program is not loaded directly through the debugger.
Any ideas?
Thanks again!
Bruce