1menu "Brownout Detector"
2
3    config ESP_BROWNOUT_DET
4        bool "Hardware brownout detect & reset"
5        depends on !IDF_ENV_FPGA
6        default y
7        help
8            The ESP32-S3 has a built-in brownout detector which can detect if the voltage is lower than
9            a specific value. If this happens, it will reset the chip in order to prevent unintended
10            behaviour.
11
12    choice ESP_BROWNOUT_DET_LVL_SEL
13        prompt "Brownout voltage level"
14        depends on ESP_BROWNOUT_DET
15        default ESP_BROWNOUT_DET_LVL_SEL_7
16        help
17            The brownout detector will reset the chip when the supply voltage is approximately
18            below this level. Note that there may be some variation of brownout voltage level
19            between each ESP3-S3 chip.
20
21            #The voltage levels here are estimates, more work needs to be done to figure out the exact voltages
22            #of the brownout threshold levels.
23        config ESP_BROWNOUT_DET_LVL_SEL_7
24            bool "2.44V"
25        config ESP_BROWNOUT_DET_LVL_SEL_6
26            bool "2.56V"
27        config ESP_BROWNOUT_DET_LVL_SEL_5
28            bool "2.67V"
29        config ESP_BROWNOUT_DET_LVL_SEL_4
30            bool "2.84V"
31        config ESP_BROWNOUT_DET_LVL_SEL_3
32            bool "2.98V"
33        config ESP_BROWNOUT_DET_LVL_SEL_2
34            bool "3.19V"
35        config ESP_BROWNOUT_DET_LVL_SEL_1
36            bool "3.30V"
37    endchoice
38
39    config ESP_BROWNOUT_DET_LVL
40        int
41        default 1 if ESP_BROWNOUT_DET_LVL_SEL_1
42        default 2 if ESP_BROWNOUT_DET_LVL_SEL_2
43        default 3 if ESP_BROWNOUT_DET_LVL_SEL_3
44        default 4 if ESP_BROWNOUT_DET_LVL_SEL_4
45        default 5 if ESP_BROWNOUT_DET_LVL_SEL_5
46        default 6 if ESP_BROWNOUT_DET_LVL_SEL_6
47        default 7 if ESP_BROWNOUT_DET_LVL_SEL_7
48
49endmenu
50