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.
Hello everybody!
I have regarding the possibility to program a Flash sector without having erased it first!
I have found rather contradictory information from the following sources:
1. This thread: TMS320F28035: Using Flash - C2000 microcontrollers forum - C2000™︎ microcontrollers - TI E2E support...
2. This thread: OTP programming on F2812 with CCS v5 - C2000 microcontrollers forum - C2000™︎ microcontrollers - TI E2E...
3. SPNA117A: . On page 4/11, the document mentions that there are several steps required to program Flash using Flash API functions, one of which is erasing the target flash.
So, is erasing Flash a necessary step before programming it?
To give some context to my question: if I want to program a sector in Flash Bank 0 of the TMS570LS1224, do I need to necessarily first erase said sector before programming it?
Thank you in advance!
Mihail
Hello Mihail,
The flash program operation can only change the bit from 1 to 0. The erase operation sets all bits in the sector or bank to 1. With a freshly erased sector, any location can be programmed. However, once a bit has been set to 0, only by erasing the entire sector can it be changed back to 1.
My answer is the sector has to be erased before programming any data to this sector.