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.

Issue in writing into internal flash TMS570LC4357

Other Parts Discussed in Thread: TMS570LC4357, HALCOGEN

Hi All,

I am using TMS570LC4357 ,HALCoGEN 04.05.02, F021 02.01.01 . Main code is in Bank0. I have copied code from FLASH to  RAM using Copy table. Writing to Bank 1 was successful. but  I tried writing data to Bank0 ,  Problem is the program hangs at below two functions

 Fapi_issueProgrammingCommand()

Fapi_issueAsyncCommandWithAddress()

and when I suspend the debug , the data has been written into flash and control goes to prefetchEntry, please see the screenshot below.

Why the program hangs at these two functions?

Thanks,

Apoorva 

  • This usually means that your program tried to fetch an instruction from bank 0 before the program operation was complete. Take a look at the LR. It will likely contain an address you were executing from in RAM. Is there a branch or bl instruction before that? Is the function that it is trying to call in bank 0? If the LR points to the prefetch abort, that means that fetching the abort routine caused another abort, and overwrote the address you are looking for. If that is the case, try setting a hardware breakpoint on the prefetch abort instruction to halt the CPU so you can see the LR contents before it is overwritten.