Using the Arduino Due on a project, I have found that I commonly run into the issue Flash Page is Locked when attempting to upload.

I have used the library write functions of DueFlashStorage that lock and unlock addresses on each write. I believe a combination of this locking/unlocking and power loss during writes has caused my woes. This lib has added functions that avoid locking/unlocking memory on each write so this problem could be averted in that way.

My question is, are there other common actions that can cause the flash to lock? If I ran blink on a Due for a long period of time power cycling it randomly would the same error eventually occur? This seems to be a common issue with the due but beyond this library I have not found other causes.

  • the count of writes to flash si limited. with the flash library you can write data to flash. did you do many writes to flash? – Juraj Mar 15 '19 at 14:20
  • 1
    For my current setup I do write to flash but not close to 10,000 times before the flash page locks and it becomes complicated to reprogram the due. I'm using 10,000 as a conservative maximum. If I did not write to flash in my program is there any reason why the flash would become locked? – jmb2341 Mar 16 '19 at 14:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.