ADC reading without blocking CPU

hugonbs
Posts: 2
Joined: Wed Jan 10, 2018 11:52 am

ADC reading without blocking CPU

Postby hugonbs » 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

Ritesh
Posts: 1383
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: ADC reading without blocking CPU

Postby Ritesh » Sat Feb 02, 2019 7:25 pm

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.
Regards,
Ritesh Prajapati

Who is online

Users browsing this forum: No registered users and 178 guests