confused with the value of system_adc_read

Harold L.
Posts: 26
Joined: Thu Dec 18, 2014 3:24 pm

confused with the value of system_adc_read

Postby Harold L. » Fri Jul 03, 2015 11:25 pm

I'm using a 3.3v VDD to power up 8266, and expect system_adc_read() returns 0~1023 mapped to 0~1v as the document says, and it works perfectly until I write esp_init_default.bin to the flash.

before flash esp_init_default.bin, the content of 0x1FC000 was filled with 0xff, and all the things worked perfectly.

after flash esp_init_default.bin, strange things happen: system_adc_read() always returns 1023

Should I write esp_init_default.bin to our new product?

costaud
Posts: 138
Joined: Fri Oct 24, 2014 7:40 pm

Re: confused with the value of system_adc_read

Postby costaud » Tue Jul 07, 2015 5:35 pm

Harold L. wrote:I'm using a 3.3v VDD to power up 8266, and expect system_adc_read() returns 0~1023 mapped to 0~1v as the document says, and it works perfectly until I write esp_init_default.bin to the flash.

before flash esp_init_default.bin, the content of 0x1FC000 was filled with 0xff, and all the things worked perfectly.

after flash esp_init_default.bin, strange things happen: system_adc_read() always returns 1023

Should I write esp_init_default.bin to our new product?


1. If the flash data of the init.bin address is filled with 0xff, CHIP will use the default value inside.
2. to use the ADC function( instead of READ VDD33), you need to set the byte[107] to the real input voltage.
eg. Set the byte[107] to 0x22(34) if the practical input voltage is 3.4v.
Find details in programming guide COMPARING WITH system_get_vdd33 function.

Who is online

Users browsing this forum: No registered users and 93 guests