Hi,
I am working on TMS570 20216. After tried to copy flash block from 0x00080000 to 0x00000000, the error occur:
CortexR4: Flash Programmer: Error initializing device.CortexR4: Flash Programmer: Error erasing Flash memory.CortexR4: Flash Programmer: Error erasing Bank 0, Sector 0. Operation Cancelled.CortexR4: Trouble Writing Memory Block at 0x80000 on Page 0 of Length 0x8 CortexR4: GEL: File: C:\test.elf: Load failed.
I am using CCS5.1.1.
I have read several threads about this problem in the forum but no one got verified answer. It seems that the flash was locked (from other threads) but I don't know how to check it and why it was locked.
Where can I find something like CSM? I can't find it in On-Chip Flash.
Anyone has any idea?
thanks
some words can't displayed in my last post:
It seems that the flash was locked (from other threads) but I don't know how to check it and why it was locked.
Where can I find something like CSM (code security module)? I can't find it in On-Chip Flash.
I only found CSM (command state machine) in reference manual, are they the same things?
is there anyone could give me an idea of locking flash?
Hello:
I'll check with our experts to get an answer for your problem.
Regards,
Enrique Lizarraga
Good afternoon:
Could you try the following and let me know the outcome?
1) Try programming the flash using nowFlash instead of CCS and see if that works.
2) Try connecting in a step-by-step way instead of clicking on the “Debug Active Project” in CCS:
- Right click on the target configuration file (.ccxml) and launch configuration
- Reset the target
- Connect to the target
- Go to Tools->On-chip Flash and click on Erase to erase the flash
Thank you,
Hi, Enrique
The second method does work.
But it is strange because I have did this way before without "-Reset the target", it didn't work. I do "Reset the target" before connection this time, it works. Why?
Thank you very much anyway.
It only works once!
Now, the same problem occur and I can't erase flash in this way.
By the way, I can't using nowFlash cause the process on a Jtag chain.
I still want to know in what condition the flash can't be erased through Jtag?
J Yin By the way, I can't using nowFlash cause the process on a Jtag chain.
If a post answers your question please mark it with the "Verify Answer" button
Search the wikis for common questions: CGT, BIOS, CCSv3, CCSv4Track a known bug with SDOWP. Enter the bug id in the "Find Record ID" box
Yes, I am using custom board.
It always works find until I do copy data between the sections in the Flash. I did this kind of copy many times,
most of them are successful, then the problem jumped out.
J Yin It always works find until I do copy data between the sections in the Flash. I did this kind of copy many times, most of them are successful, then the problem jumped out.
Just to make sure I understand what you mean here, are you saying that your code copies some data between Flash sectors at runtime? And with this code you have been able to erase/reprogram the flash many times in the past, but the problem has started appearing recently? What I am trying to understand is if this error has always appeared when trying to erase/program the device or only started appearing in a particular situation, and if so, what is it that triggered it to start appearing.
Can you also attach a screenshot of your Flash programmer settings (where you can set which sectors are to be erased etc)?
Hi, you are right.
I run the application on 0x00080000, erase bootloader at 0x0 (bank 0, sector 0 to 3) and copy a new bootloader to that address. Then reset to run from 0x0.
This function is under testing, so I have modified the bootloader, maybe copy in some unexpected data, but I can't remember any specific trigger for this error.
I just thought that no matter what data was write (no matter where) in the flash, it should not forbid to erase flash through Jtag. am I right?
Can you try changing the Erase options setting from "Necessary sector only" to "Entire Flash" and see if that helps?
I have done this but same error messages.
Just to clarify, your TMS570 20216 does is not locked, as this device does not support CSM/password programming.
But based on the initial error "Error initializing device.", it is having trouble with the Flash operation setup sequence. The error itself does not provide enough information on the cause of the problem though.
Just for your information, the main functionality of the initializing sequence is to set up the clock settings/PLL value of the device; based on the crystal value, which I can see you have it at the default value of 16MHz. Another thing thing to note is that the Flash algorithm is perform on target RAM memory, so make sure that is available.
Other suggestions to try:
1. Power cycle the device, and make sure the device is in a good state before trying to erase again.
2. Generate the Debug Server logs (more information here: http://processors.wiki.ti.com/index.php/Troubleshooting_CCS#Debug_Server_Logging) during the test case, which might provide us with more information on where exactly the code is failing, although it most cases, it still does not give us enough information for debugging purposes. Either way, it could be a good thing to try.
Please let me know if you have any questions.
Thanks,
Ricky