repeated write/reads from internal flash

Hi support

I am using the app core of the nrf5340 chip and currently testing using a nrf7002dk dev kit. I am compiling code using sdk v3.0.0.

I am trying to access the internal flash memory of the nrf5340 using the zephyr flash interface. However I am finding that when I write to the same address 2 times, the value that I read back is not correct.

Here are the steps that reproduce the problem

  • write 0x80808080 to internal flash at 0xf8000
  • read 0xf8000 and correctly get 0x80808080
  • write 0x0202020202 to internal flash at 0xf8000
  • read 0xf8000 and incorrectly get 0x00000000

Does the sdk allow a user to write to the same location more than once ? If so, does the flash API provide a mechanism to tell the user when the previous date write has completed so they can start another write operation ?

Related