BOR功能 是STM32L系列特有的复位和启动电压调整功能。
BOR 关闭时STM32L的供电范围是1.65 V to 3.6 V,
BOR 关闭时STM32L的供电范围是1.8 V to 3.6 V,BOR 共有5个级别,依次是
OB_BOR_LEVEL1 /*!< BOR Reset threshold levels for 1.7V - 1.8V VDD power supply */
OB_BOR_LEVEL2 /*!< BOR Reset threshold levels for 1.9V - 2.0V VDD power supply */
OB_BOR_LEVEL3 /*!< BOR Reset threshold levels for 2.3V - 2.4V VDD power supply */
OB_BOR_LEVEL4 /*!< BOR Reset threshold levels for 2.55V - 2.65V VDD power supply */
OB_BOR_LEVEL5 /*!< BOR Reset threshold levels for 2.8V - 2.9V VDD power supply */
以下是BOR功能演示
/* Get BOR Option Bytes */
BOROptionBytes = FLASH_OB_GetBOR();
#ifdef BOR_MODIFY
if((BOROptionBytes & 0x0F) != BOR_LEVEL)
{
/* Unlocks the option bytes block access */
FLASH_OB_Unlock();
/* Clears the FLASH pending flags */
FLASH_ClearFlag(FLASH_FLAG_EOP|FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR
| FLASH_FLAG_SIZERR | FLASH_FLAG_OPTVERR);
/* Select the desired V(BOR) Level ---------------------------------------*/
FLASH_OB_BORConfig(BOR_LEVEL);
/* Launch the option byte loading */
FLASH_OB_Launch();
}
文章评论(0条评论)
登录后参与讨论