mabl / ARMCM3-STM32F107-BOOTLOADER

Example bootloader for the Olimex STM32P107 board, loading the firmware from the SD card.
32 stars 23 forks source link

Bit PER not unset #3

Open 0x3333 opened 5 years ago

0x3333 commented 5 years ago

When erasing, the bit PER on CR is not unset, which will block further writes to flash.

https://github.com/mabl/ARMCM3-STM32F107-BOOTLOADER/blob/109a2d2d509edf39579bfbf94e54e55d508d62f7/ARMCM3-STM32F107-BOOTLOADER/flash/flash.c#L60

Should read:


FLASH->CR &= ~FLASH_CR_PER;```