1

Where is the definition of uint16 system_adc_read(void) in the esp8266 Arduino code?

I can see it being declared in Arduino/tools/sdk/include/user_interface.h, however there seems to be no definition of this. system_adc_read() gets called in analogRead() in Arduino/cores/esp8266/core_esp8266_wiring_analog.c

I suspect system_adc_read() calls system_adc_read_fast() to read the ADC, but can't actually find it in the code! Could somebody please point me to this? I've been struggling for quite some time.

Purpose: To manipulate the system_adc_read() in ESP8266 to get higher ADC sampling rates. Right now ADC sampling rate is 10ksps. I want it to be more than 30-40ksps.

  • 1
    esp8266 sdk is not open source – Juraj Dec 28 '17 at 17:06
  • Oh my god! Thanks for telling me this. So, what are my alternatives here? I've searched for ways to improve the sampling rate, but couldn't get to the desired (30-40 ksps) level. – Ashish Ranjan Dec 28 '17 at 17:14
  • try ESP8266 Non-OS SDK API Reference here espressif.com/en/support/download/… – Juraj Dec 28 '17 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.