56.4.5.2 Fuse Programming
All the fuses can be written by software.
The sequence to program fuses is the following:
- Write the key code 0xFB in the Key register (SFC_KR).
- Write the word to program in the corresponding SFC_DRx. For example, if fuses 0 to 31 must be programmed, SFC_DR0 must be written. If fuses 32 to 61 must be programmed, SFC_DR1 must be written. Only the data bits set to level ‘1’ are programmed.
- Wait for flag SFC_SR.PGMC to rise by polling or interrupt.
- Check the value of flag PGMF. If it is set to 1, the programming procedure has failed.
After programming, the fuses are read back in the corresponding SFC_DRx.