This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

write protection mechanism is not working in the internal flash of nrf5340 dk

Hi ,

My environment :

  1. nrf connect sdk
  2. nrf5340 dk
  3. segger studio IDE

verified method 1:

As per nrf5340 product specification document , we can protect the flash erase and flash write operations using write protection.

CONFIG is a register in NVMC . we can set read only access when set 0 in CONFIG register
NRF_NVMC->CONFIG = 0; // read only access
but, I am able to erase the flash and write the flash. It should not happen.

Verified method 2:

As per below link

docs.zephyrproject.org/.../group__flash__interface_gaf0cda694a08f6bcf230b08790c12b3c2.html

If we want erase the flash and write the flash need to pass false in the second argument to the below function.

flash_write_protection_set(flash_dev, false);

If we want to protect the flash erase and flash write need to pass true in the second argument to the below function .

flash_write_protection_set(flash_dev, true);


but, I am able to erase the flash and write the flash even if pass true in the second argument .

Note : In two methods, I am not able to protect the erase and write operation in the internal flash . please let me know , how can I proceed to use write protection mechanism for block the erase and write flash.

Thanks & Regards,

Srinivas Rao.

Related