Skip to content

Commit

Permalink
Don't check and write protect the system firmware on boot
Browse files Browse the repository at this point in the history
There is a possibility that in low power / unreliable power situations that checking if the system firmware flash pages are write protected will give the wrong result. The system firmware would attempt to write protect the system firmware flash pages, which erases the option bytes and if the device resets at that moment, sets the write protection level 1.

A similar change was made to the bootloader in #1578
  • Loading branch information
monkbroc authored and avtolstoy committed Jan 31, 2020
1 parent e8d4828 commit 95b7352
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions hal/src/stm32f2xx/core_hal_stm32f2xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,11 +383,6 @@ void HAL_Core_Config(void)
// fully intialize the RTOS.
HAL_Core_Setup_override_interrupts();

#if defined(MODULAR_FIRMWARE) && MODULAR_FIRMWARE
// write protect system module parts if not already protected
FLASH_WriteProtectMemory(FLASH_INTERNAL, CORE_FW_ADDRESS, USER_FIRMWARE_IMAGE_LOCATION - CORE_FW_ADDRESS, true);
#endif /* defined(MODULAR_FIRMWARE) && MODULAR_FIRMWARE */

#ifdef HAS_SERIAL_FLASH
//Initialize Serial Flash
sFLASH_Init();
Expand Down

0 comments on commit 95b7352

Please sign in to comment.