boardloader: use PVD level 4

This commit is contained in:
Pavol Rusnak 2017-10-29 17:58:33 +01:00
parent 30ddb53c11
commit a08f18c2ce
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
1 changed files with 2 additions and 3 deletions

View File

@ -65,13 +65,12 @@ void periph_init(void)
__HAL_RCC_GPIOD_CLK_ENABLE();
// enable the PVD (programmable voltage detector).
// select the "2.7V" threshold (level 5). the typical electrical
// characteristic values are similar to BOR level 3.
// select the "2.6V" threshold (level 4).
// this detector will be active regardless of the
// flash option byte BOR setting.
__HAL_RCC_PWR_CLK_ENABLE();
PWR_PVDTypeDef pvd_config;
pvd_config.PVDLevel = PWR_PVDLEVEL_5;
pvd_config.PVDLevel = PWR_PVDLEVEL_4;
pvd_config.Mode = PWR_PVD_MODE_IT_RISING_FALLING;
HAL_PWR_ConfigPVD(&pvd_config);
HAL_PWR_EnablePVD();