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

Fill unused flash with predefined value

Hi,

I use uVision3 with the C166 compiler for an XC167 with external Flash.
My flash utility erases only the used sectors of the flash, but i want all the sectors to be erased. So I thought to fill the hex file with 0xFF.
Can anyone tell me how to do this.

Thanks.

Parents
  • My flash utility erases only the used sectors of the flash, but i want all the sectors to be erased. So I thought to fill the hex file with 0xFF

    Use hex2bin to convert to a binary image specifying the size of your flash and a pad character of 255, then convert back to hex using bin2hex. I'm fairly sure both utilities are downloadable from this website amongst many other places.

Reply
  • My flash utility erases only the used sectors of the flash, but i want all the sectors to be erased. So I thought to fill the hex file with 0xFF

    Use hex2bin to convert to a binary image specifying the size of your flash and a pad character of 255, then convert back to hex using bin2hex. I'm fairly sure both utilities are downloadable from this website amongst many other places.

Children