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.

RM57L843: Probe erasing flash via uniflash or CCS, but the unused contents are not all 0xff?

Part Number: RM57L843
Other Parts Discussed in Thread: UNIFLASH

Hello TI engineer:

I had solved " Bootloader erase flash using F021 API, but the contents are not all 0xff?" problem.

RM57L843: Bootloader erase flash using F021 API, but the contents are not all 0xff? - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums

Thank you.

But I found when I debugging the program, erasing and programming the codes into flash via probe on CCS, the unused contents of flash are also not all 0xff? Same problem is met using uniflash.

How to fix it? My linker cmd as following: 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
--retain="*(.intvecs)"
/* USER CODE BEGIN (1) */
ECC {
algoL2R5F021 : address_mask = 0xfffffff8 /* Address Bits 31:3 */
hamming_mask = R4 /* Use R4/R5 build in Mask */
parity_mask = 0x0c /* Set which ECC bits are Even and Odd parity */
mirroring = F021 /* RM57Lx and TMS570LCx are build in F021 */
}
/* USER CODE END */
/*----------------------------------------------------------------------------*/
/* Memory Map */
MEMORY
{
/* USER CODE BEGIN (2) */
/* USER CODE END */
VECTORS (X) : origin=0x00000000 length=0x00000020
FLASH0 (RX) : origin=0x00000020 length=0x001FFFD0 vfill=0xffffffff
SW_VERSION (RX) : origin=0x001FFFF0 length=0x00000008 /* Software Version */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Xi,

    It is expected. The flash erase operation doesn't generate and program the ECC value (0x3 for blank location) to ECC area. A sector is the smallest region in the flash bank that must be erased, which means that the ECC value of the unused portion of the erased sector is not valid (0xff). 

    You can append 0x0 to your application image to fit the whole sector. I will give you an example later.

  • Can you give me an example?

  • I don't have an working example now, and will write an example for you next week.