about nrf52832 write flash by jlink

hi ,i want write flash by jlink,eg:write val 0xaaffffff to addr 0x76000, only write 4byte.

but when i write, err "flash not erase" occurred,

I don't want to erase this flash because there are other data on this page.

So I want to ask if there is a way to rewrite only one byte of the flash of this page through JLINK without erasing the whole page of flash.

Parents
  • Hi,

    Just as Vasiliy said. You need to erase the flash area before you write to it. 

    If you want to keep the content of the flash page, you would need to read the content out, modify what  you want to change and then erase and write the new content back. 

    If you only change from 1 to 0 on the bit, and don't want to erase you can try using nrfjprog --memwr . This tool won't require the whole flash page to be erased to write. 

Reply
  • Hi,

    Just as Vasiliy said. You need to erase the flash area before you write to it. 

    If you want to keep the content of the flash page, you would need to read the content out, modify what  you want to change and then erase and write the new content back. 

    If you only change from 1 to 0 on the bit, and don't want to erase you can try using nrfjprog --memwr . This tool won't require the whole flash page to be erased to write. 

Children
No Data
Related