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.

F28335 Flash_Erase and Flash_Program trouble after reboot

Other Parts Discussed in Thread: TMS320F28335, SYSBIOS

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

 

 

  • Problem solved, there was some bad mapping in my cmd file.

    I saved the flash API into an area that I shared with some program data. When I did an erase of that data sector the flash API was also being erased. So when a restart or reset occurred, it would boot from flash fine, but the flash API was no longer there to load to RAM. I can't explain why the flash_read would still work however.

    Anyways... back up and running.

  • HI Bruce

    I am developing my application on eZdsp f28335 using TI-RTOS V2.0 with CCSV6.0. I wanted to see execution graph and cpu load for my tasks in the application using UIA 2.0.0.28. It was all showing good but suddenly when I ran the same code with no modifications at all It started to gave me the following error which is very similar to yours.

    ti.sysbios.family.c28.hwi: line 1009

    E_unpluggedinterrupt. Unplugged interrupt occurred intr # 19

    xdc.runtime.Error.raise: terminating execution.

    Please pardon me for a basic question as i am totally new . Could you give me the reason for this error or what is the solution for this in simple words

    Thanks alot

    Hammad

  • Hi Hammad,

    This error is indicating that interrupt #19 was flagged and enabled but it is never plugged.  Another words, seems like a bogus interrupt happened.

    Because it wasn't plugged, the function Hwi_unPluggedInterrupt() is executed which raises the error that you see.

    Just disable the interrupt you're not using esp. check whether the watchdog interrupt has been disabled.

    Regards,

    Gautam

  • Thank you gautam for your reply.

    Actually I changed the Clock frequency of F28335 eZdsp in BIOS configurations. Previously i was running it at 60MHz and now i am running it on 150MHz .. Now there is not this interrupt error. I don't know why but its not there

  • Hammad Saif said:
    Actually I changed the Clock frequency of F28335 eZdsp in BIOS configurations. Previously i was running it at 60MHz and now i am running it on 150MHz .. Now there is not this interrupt error. I don't know why but its not there

    That's Great, Hammad! (This seems like a configuration error)

    Goodluck & Regards,

    Gautam