Hello forum,
i am currently monitoring a signal input for a specific voltage level to be reached.
running adc1 in continuous mode and have the monitor enabled for a specific high_threshold.
That works fine.
However, i need to change the high_threshold frequently to adjust for changing sensitivity.
ITo change the high_threshold you would need to stop the monitor and the continuous driver, change your settings, and re-eanable everything again.
Is there a way to change the monitors threshold on the fly?
thanks
esp32 adc monitor, change threshold while running
-
lichurbagan
- Posts: 60
- Joined: Thu Nov 13, 2025 3:20 pm
Re: esp32 adc monitor, change threshold while running
You cannot change thresholds using the ADC monitor API. The driver needs a full stop and restart. However, the hardware supports live threshold updates. Write directly to the ADC threshold registers. This works without stopping the ADC. It updates the threshold instantly.
You must know the correct register. I can provide it if you give your chip type. Another option is software threshold checking.
Read samples and compare them in your task. This allows easy dynamic changes. The slow option is reinitializing the monitor.
You must know the correct register. I can provide it if you give your chip type. Another option is software threshold checking.
Read samples and compare them in your task. This allows easy dynamic changes. The slow option is reinitializing the monitor.
Who is online
Users browsing this forum: ChatGPT-User and 3 guests