STM32WB Fast Programming with FSTPG
Greetings,
We are adding an OTA procedure to our firmware that depends on a small loader at the start of flash which is responsible for programming the main application written to program flash at a higher address. The procedure works fine as it is, except that we are not finding it possible to use the Fast Programming feature.
According to the RM, before FSTPG programming can be used, the device must be mass erased. Yet, CPU1 is not permitted to perform this operation. We suspect that it may be possible to execute a mass erase from the C2 coprocessor, which could be acceptable, however, we don't want to lose the loader. The WRP bits in the option bytes would protect the loader...except that the documentation explains that setting WRP precludes any mass erase.
So, our question is this. Is there a way we can use FastProgramming from the user application code to improve the speed of programming our firmware?
FWIW, we checked the Cube sources and this code is doing the same thing we are. When we initiate the programming sequence, the MCU returns error code bits for FPRGERR, PGSERR and PGAERR.
Cheers
