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.

F28M35H52C: erase api function Fapi_issueAsyncCommandWithAddress does not work the second time i erase the location

Part Number: F28M35H52C

Hi,

I am trying to make a bootloader (that is part of the application that loads and runs from RAM) for C28 DSP  while the rest of the applicaiton runs in flash.

I tested my code by erasing and programming at sector N, M, L and K (which is just empty sectors not containing the program code) just for testing if i could erase program, multiple times and every thing works.

But if i try to erase the location where my program is running i.e sector D, C, B and A, the sectors are erased and written with a new data. The bootloader in RAM does all the erase and writing.  This runs for the first time and when i try to do the same thing again, erase does not work and every thing fails. The erase api Fapi_issueAsyncCommandWithAddress  return success but the blankcheck api function fails.

The binary data which i am writing to these sectors is actually a data read from the memory in debugger mode and dumped in to a file.

I am not sure whether i can use the memory data read from debugger and write to the sector will make it work?

What can be cause of erase failure.

Any thing in that regards will be appreciated.

  • Adnan,

    Regarding erase issue:  Please search for below questions in Flash wiki at http://processors.wiki.ti.com/index.php/C2000_Flash_FAQ#Flash_API_wiki 

    1. "What are the common debug tips that we can consider when Flash API fails to erase or program?"
    2. "Does Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, xx) function call return after completing the sector erase operation?"
    3. "If the Fapi_issueAsyncCommandWithAddress(Fapi_EraseSector, xx) does not wait for the erase operation completion, how do we know whether the erase operation succeeded or not?"

    Regarding program question:  You can use data from debugger to program.  

    Thanks and regards,

    Vamsi

  • Hi

    I tried to generate binary from the CCS6 and used that as the data to program the flash and evert thing work as intended.
    There seems to be that the data that i dumped from the memory in the debugger mode had some issue.

    Regards