In this use case, the BODVDD 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:
static void configure_bodvdd(void)
{
}
Add to user application initialization (typically the start of main()
):
Workflow
- Create a BODVDD module configuration struct, which can be filled out to adjust the configuration of a physical BOD peripheral.
- Initialize the BODVDD 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 BODVDD module with the desired settings.
- Enable the BODVDD module so that it will monitor the power supply voltage.
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.