This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
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

Internal Flash Write & Read

Hi,

I am using NRF52832. I Have two doubts to clarify about internal flash 

1) I have done the flash write of the timestamp in a specific address of internal flash. its writes successfully. But, while reading it prints garbage value

2) If I am Set the start address and end address as 3d000 and 3ffff.  I can able to use 0x3d000,0x3e000,0x3f000. I need one more like this to store timestamp 

help me regarding this

Thank you,

Parents
  • Hi,

    What SDK (and version) are you using?

    What libraries/modules/APIs are you using for doing the flash writing and reading?

    Can you share the code doing the flash writing and reading?

    Please note that flash operations take some time, and require program execution to be halted while it happens. Because of this, the flash API is typically asynchronous. There is one function to queue a write or erase, and then you get a callback when the operation has been successfully performed. If you read back before you get this callback, then the flash has not yet been written.

    Letter ÿ typically corresponds to 0xFF in extended ASCII encoding, and so what you read back is most likely a flash area filled with 0xFF, which is the state of flash when erased (not yet written to). So most likely you are reading before the write has been performed.

    Regards,
    Terje

Reply
  • Hi,

    What SDK (and version) are you using?

    What libraries/modules/APIs are you using for doing the flash writing and reading?

    Can you share the code doing the flash writing and reading?

    Please note that flash operations take some time, and require program execution to be halted while it happens. Because of this, the flash API is typically asynchronous. There is one function to queue a write or erase, and then you get a callback when the operation has been successfully performed. If you read back before you get this callback, then the flash has not yet been written.

    Letter ÿ typically corresponds to 0xFF in extended ASCII encoding, and so what you read back is most likely a flash area filled with 0xFF, which is the state of flash when erased (not yet written to). So most likely you are reading before the write has been performed.

    Regards,
    Terje

Children
Related