AnsweredAssumed Answered

How to tell when a full flash erase is complete

Question asked by lisper on Jun 15, 2016
Latest reply on Jun 15, 2016 by Clive One
I just discovered the hard way that if you initiate a full flash erase cycle (in my case, by going from RDP level 1 to level 0) and reset the chip before that process is complete then the chip is essentially (AFAICT) bricked.  DFU mode will no longer allow you to download new code.  When I try (using dfu-util) it says "ERASE_PAGE not correctly executed".

So my question is: how can you know when a full flash erase is done?  You can't provide feedback from software (again, AFAICT) because both the flash and the user RAM get erased, so there's no more code to execute.  And I can't find any documentation that says how long a full flash erase takes.  So how can you know how long to wait before resetting without bricking the chip?