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.

TM4C129 Flash not erasing properly

Other Parts Discussed in Thread: TM4C123GH6PGE, SEGGER

Hi All,


I am currently using a custom board with TM4C1292NCPTD. The previous version of this board was populated with a  TM4C123GH6PGE.


I have recently ported my main application from the TM4C123 to the TM4C129 and everything runs fine.

My problem however is with the booloader on this micro. I run a bootloader from Segger that reads a binary file from an SD card then writes it to the flash. I have used this bootloader succesfully on this board when it had the TM4C123 populated. Now that I am using the TM4C129 I am having some difficulty.


The problem I am having is with the flash. I have reserved flash from 0x10000 to 0x100000 for my application and 0x0 to 0xFFFF for the bootloader. My application is about 192Kbytes so it fits comfortable on the first bank of the flash.


The bootloader writes the application into flash starting at 0x10000 then writes a CRC and IDCODE at the back of the declared flash region. In my case this CRC and IDCODE combination are two words long and are written at address 0xFFFF0 of the flash. This is the only data that the bootloader writes to that last sector of the flash.

The problem happens that when I try to erase that specific sector. Those two words (CRC and IDCODE) are not erased, for some reason that I do not understand. I have manged to get a workaround for this by writing something other that 0xFFFFFFFF into address 0xFFFF8, which is the word just after the CRC and IDCODE. If I then erase that sector again the sector erases properly.


So to sum up:

1. Wirte word other than 0xFFFFFFFF to 0xFFFF0 and 0xFFFF4.

2. Erase sector 0xFC000.

3. Note that the values in 0xFFFF0 and 0xFFFF4 were not erased.

4. Write word other than 0xFFFFFFFF to 0xFFFF8.

5. Erase sector 0xFC000.

6. Note that all words in the sector were erased correctly.

I would appreciate it if someone could verify if they have this same problem on any of the TM4C129's, or maybe just tell me what I might be doing wrong.