I want to write a specific value to an address in flash using openocd.
The address is 0x0003FFF0
. ANd the value I want to write to it is 0xFFFFC000
.
To erase that address I used:
flash erase_address 0x0003FFF0 2048
but got an error message address range 0x0003fff0 .. 0x0003ffff is not sector-aligned
To fix this I ran flash info 0
to find the address to start from and then ran flash erase_address 0x38000 2048
and this worked.
Finally to write the value to flash I tried:
reset halt
mww 0x0003FFF0 0xFFFFC000
but got this error:
SWD ack not OK: 4 FAULT
SWD IDCODE 0x2ba01477