Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By EyC
#92371 You need to activate the PHY layer first. In my experience, if you don't do it, the ADC_READ_VDD_MODE will always read 4466.

Just include "esp_wifi.h" and add these three lines at the start of app_main():

Code: Select allESP_ERROR_CHECK(esp_event_loop_create_default());
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );

After that, in the monitor, you should see something like this:

phy_version: 1163.0, 665d56c, Jun 24 2020, 10:00:08, RTOS new
I (410) phy_init: phy ver: 1163_0

Also remember to comment out the adc_read_fast block, since it is not suitable for Vcc mode.
User avatar
By EyC
#92380 Which function?

Original poster clearly states he is using the ESP8266_RTOS_SDK v3.4.. Specifically the adc example project from the peripherals section of the SDK installation.

The function app_main() is part of adc_example_main.c. The wifi related functions are part of that SDK components.