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.
Hi everyone
We're currently having an issue downloading the flash ECC in address 0xF0400000 (spnu499c, 2.2.3.2 ECC Protection for Flash Accesses) with UNIFlash. We´re getting the following error message:
[ERROR] CortexR4: Trouble Writing Memory Block at 0xf0400000 on Page 0 of Length 0x7ff0: WriteMem failed! as if it were not possible to write in that memory address, so our question is it's necessary to enable any flag /permission in UniFlash so that we can write the ECC in this memory address?
It is worth mentioning that we generated ecc with nowECC tool, we gave nowECC the data readed from bank 0 and bank 1 of the device flash memory using J-Flash readback funcionality and we specified the memory map of the microcontroller as F021 16 MB with address bits, according Chapter 5 F021 Flash Module Controller (FMC) of spnu499c. It should be noted that the documentation does not explicitly mention that this is the memory map of the microcontroller, so it would also be good to ask if this really is the type of memory map that we should use to calculate the ECC?
Any help is welcome and appreciated!
Thank you in advance.
Hi Horalia,
We started working on your thread and we will provide an update ASAP.
--
Thanks & regards,
Jagadish.
Hi Horalia,
Can you please uncheck the "Auto ECC Generation" option in Uniflash and try to download the code?
--
Thanks & regards,
Jagadish.
Hi! Any input you have on this subject will be of a lot of help. I'll appreciate it
Thanks in andvance
The target is not connected. Is this J-Link debugger recognized by the uniflash? Have you tried this J-Link debugger on other device?
I have not. I'm using Eclipse/IAR for my application. I just want to use another tool to download the ECC to the flash
Yes, at the time of the screenshot the target was not connected. But with the target connected the settings and utilities window shows no parameters to configure.
Answering your other question, yes i have tried this J-Link on other devices as well with no problems.
Hi Horalia,
I tried a Segger J-Link (version 8.0) debugger on one TMS570 HDK. There is not problem to load the application image to device flash using CCS and Uniflash. But the on-chip flash settings (CCS and Uniflash) are not supported when using J-Link debugger.
1. With J-Link debugger (CCS)
2. With XDS110 or XDS100V2 debugger (CCS)
Thank you for taking the time and run the test
I was aware that the on-chip flash settings on Uniflash were not available when using a J-Link debugger however I'm curious, did you write in the dedicated region of flash ECC ? And if so, would you please explain your procedure?
Hi Horalia,
When you load your program to flash, the ECC calculation is enabled by default, so the ECC is also loaded to the flash (from 0xF0400000). You don't need to load the ECC file (generated by nowECC).
You can generate the ECC for the whole flash using linker cmd script.
Before compiling the project, please turn on the ECC generation as below:
Hi QJ,
Thank you for your response, I did not mention that we are not using Code Composer IDE for our application, we are using IAR Embedded workbench on eclipse, so we need to generate and download ecc with an external tool (we are using nowECC )
I've doing some research and i found the reason why I'm having issues downloading the calculated ECC and it's because the calculated ECC is in the memory range 0xF0400000 - 0xF045FFFF but the dedicated ECC memory region is 0xF0400000 - 0xF04FFFFF so I'm getting this error , the ECC data does not fit into the ECC flash sector
the command line I'm using on nowECC is the following:
nowecc -i Input.hex -f021 16M_ADD -r4 -o ECC_Output.hex
do you have any ideas on how to generate ECC so it fits into the ECC dedicated region?
The flash size of TMS570LS3137 is 3MB (from 0x0000-0000 to 0x0030-0000), and the ECC space is from 0xF040-0000 to 0xF046-0000).
nowecc -i Input.hex -f021 16M_ADD -r4 -o ECC_Output.hex --> correct
Your ECC file should fit the ECC space of this device.
Can you try TI uniflash to load this ECC file?
II did a test, and found that the uniflash can't load the ECC only data to the flash (from 0xf0400000). The workaround is to append the ECC data to the end of the input file. The nowECC supports this feature with '-a' Command:
The uniflash settings for loading the file with ECC data:
The file with ECC can be loaded without any issue:
Hi QJ,
I appended the ECC data to the input file as you mentioned, and I managed to change (in j link web control panel since the on-chip flash settings on Uniflash are not supported when using J-Link debugger.) the JLlink settings to avoid verification and comparison on flash download, However one final verification process is still active so the flash download fails.
I´m not aware of what other configuration should I considerate in order to avoid the final verification process.
Is there any chance you could repeat your exercise using a J Llink debugger?
The flash verification during programming needs to be skipped because the data areas and ECC areas will now be programmed in separate steps.
Hi QJ
Thanks for following up on this thread. I realize that I need a debugger that allows me to properly configure the process to avoid the last check that causes the flash download process to fail, since this is not possible with a JLink.
I would like to ask you if you recommend a specific debugger for the TMS570LS3137 or if using any debugger listed in UNIflash will do it
Thank you in advance