This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Erasing a sector from the internal memory block

Hello,

I have a problem when erasing the internal memory block on an XC167CS-32F microcontroller.

I can erase sectors 0, 1, 2, and 3 OK. Sector 4 fails to erase, but then sectors 5, 6, and 7 erase OK.

I can write to all of the sectors (with the exception of sector 3).

The Keil uVision 'Flash->Erase' instruction DOES manage to do the erase correctly, so I know that my device is OK - it is just down to something that I am doing wrong.

Is it possible that one of the sectors (sector 4) has become 'protected', and if so, how do I go about reseting things so that the sector is no longer protected !

Thanks for you help,

Simon May

Parents
  • This issue has now been resolved.

    It turns out that the code that I have been using from the start HAS been working.

    The reason that I thought that it was NOT working was that the UVision debugger memory window was showing me that the flash ROM module contained data.

    I eventually used the Infineon memtool to download the contents of the internal flash ROM module and when I looked at the resultant data files, I could see that the internal flash ROM module HAD in fact been erased.

    Simon May

Reply
  • This issue has now been resolved.

    It turns out that the code that I have been using from the start HAS been working.

    The reason that I thought that it was NOT working was that the UVision debugger memory window was showing me that the flash ROM module contained data.

    I eventually used the Infineon memtool to download the contents of the internal flash ROM module and when I looked at the resultant data files, I could see that the internal flash ROM module HAD in fact been erased.

    Simon May

Children
No data