AnsweredAssumed Answered

LPC55S69: Ef(50): flash driver failed to initialize

Question asked by Charles Lonsdale on Apr 3, 2019
Latest reply on Apr 4, 2019 by Charles Lonsdale

I'm repeatedly hitting a situation where I load my latest code to the LPC55S69 demo board for debug, but if I try and load it a second time, then I get the Ef(50): flash driver failed to initialize error.

The initial error reads:

Sending VECTRESET to run flash driver

content (at 0x30006800) not set as written


I assume that my code is overwriting something critical during runtime, probably the flash driver.


I am using the PowerQuad to do a sqrt calculation either through arm_sqrt_q31() which calls the PowerQuad  or PQ_VectorSqrtFixed32() directly. Commenting out these lines seems to solve the problem.


I note that the error message above indicates a problem accessing location 0x30006800, but also note from the User Manual, that the PowerQuad uses 0x20040000 to 0x20043FFF, or 0x30040000 to 0x30043FFF as a scratchpad. Could the PowerQuad somehow be restricting access to or corrupting the flash driver in some way, and if so is there a way around this?


I should add that I am debugging through the onboard LinkServer debugger.


I can recover access to the board by holding the ISP button down and loading a random example program, so that my program is not running. At that point I can load my code again.