Page 1 of 1

ADC reading without blocking CPU

Posted: Fri Feb 01, 2019 5:30 pm
by hugonbs
Hi everyone!

My problem is that ADC read with function adc1_get_raw() cause CPU block while ADC reading not ready, making ADC reading a blocking function. The idea is pull ADC register to read if ADC reading value is ready when CPU is in idle state.
Or, anyone knows the sequence and registers to handle to make this job?

Thanks

Re: ADC reading without blocking CPU

Posted: Sat Feb 02, 2019 7:25 pm
by Ritesh
hugonbs wrote:
Fri Feb 01, 2019 5:30 pm
Hi everyone!

My problem is that ADC read with function adc1_get_raw() cause CPU block while ADC reading not ready, making ADC reading a blocking function. The idea is pull ADC register to read if ADC reading value is ready when CPU is in idle state.
Or, anyone knows the sequence and registers to handle to make this job?

Thanks
Hi,

I think for that you need to add few custom logic into application side to execute get ADC raw data value if and only if ADC is ready to read voltage reading using registers.

So, Did you try with that type of solution or are you facing any difficulties while implementing that?

Let me know if you need any help regarding that and also Espressif Team has updated lot into ADC to make it more stable with accuracy into last stable ESP32 IDF.