I've bricked several devices due to power loss during a firmware update. I understand that this is due to flash depletion, and that the csm passwords get corrupted. However, Im setting the password to 0xFFFFFFFFFFFFFFFF, which I assume leaves the code security module disabled. In this circumstance, should losing power during a flash erase cause such bricking? Alternatively, if what Im doing now isn't satisfactory to disable CSM, what are the necessary steps to disable CSM, such that losing power during an erase does not cause this bricking?
Secondly, the way depletion is described, it sounds like something that happens over time, as opposed to a singular event going from perfectly working flash to not working at all flash. This idea is supported by the existence of functions to repair depleted sectors. However, when this problem happens for me, it always bricks on the very first instance of power loss during flash erase.