Before a Brown-Out Detector (BOD
VDD) is enabled, it must be configured,
as outlined by the following:
- Set the BOD threshold level (BODVDD.LEVEL)
- Set the configuration in active,
standby (BODVDD.ACTCDG,
BODVDD.STDBYCFG)
- Set the prescaling value if the BOD
will run in sampling mode (BODVDD.PSEL)
- Set the action and hysteresis
(BODVDD.ACTION and BODVDD.HYST)
The BODVDD register is
Enable-Protected, meaning that they can only be written when the respective BOD is disabled
(BODVDD.ENABLE=0 and SYNCBUSY.BODVDDEN=0). As long as the Enable bit is '1', any writes to Enable-Protected
registers will be discarded, and an APB error will be generated. The Enable bits are not
Enable-Protected.