In this use case, the BOD33 and BOD12 will be configured with the following settings:
- Continuous sampling mode
- Prescaler setting of 2
- Reset action on low voltage detect
Quick Start
Prerequisites
There are no special setup requirements for this use-case.
Code
Copy-paste the following setup code to your user application:
Add to user application initialization (typically the start of main()
):
Workflow
- Create a BOD33 module configuration struct, which can be filled out to adjust the configuration of a physical BOD peripheral.
- Initialize the BOD33 configuration struct with the module's default values.
- Note
- This should always be performed before using the configuration struct to ensure that all values are initialized to known default settings.
- Configure the BOD33 module with the desired settings.
- Enable the BOD33 module so that it will monitor the power supply voltage.
The workflow of the BOD12 is the same as for the BOD33.
Use Case
Code
Copy-paste the following code to your user application:
Workflow
- Enter an infinite loop so that the BOD can continue to monitor the supply voltage level.