system_get_vdd33() and the elusive 107th byte

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

system_get_vdd33() and the elusive 107th byte

Postby blubb » Sun Jul 26, 2015 4:27 am

How do I use system_get_vdd33() on an ESP-01 to get a correct measurement?

I get 65535 all the time.

In the manual it says

system_get_vdd33 can only be called when TOUT pin is suspended


I do not know what is the case on ESP-01. But let's assume* it is suspended...
I went on reading...

The 107th byte in esp_init_data_default.bin(0〜127byte) is named as
“vdd33_const“ , when TOUT pin is suspended vdd33_const must be set as
0xFF, that is 255


Ok, I thought. Have a look at this file. This is the current (SDK 1.2.0) esp_init_data_default.bin:

Code: Select all

05 00 04 02 05 05 05 02 05 00 04 05 05 04 05 05
04 FE FD FF F0 F0 F0 E0 E0 E0 E1 0A FF FF F8 00
F8 F8 52 4E 4A 44 40 38 00 00 01 01 02 03 04 05
01 00 00 00 00 00 02 00 00 00 00 00 00 00 00 00
E1 0A 00 00 00 00 00 00 00 00 01 93 43 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
03 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00


So byte 107 is 0 by default? This does not seem right to me... Can someone explain?

* If my assumption was wrong and the pin is not suspended... another quote from the SDK:

The 107th byte in esp_init_data_default.bin(0〜127byte) is named as
“vdd33_const”, and when wire TOUT pin to external circuitry, the
vdd33_const must be set as real power voltage of VDD3P3 pin 3 and 4.


Still 0 has to be an incorrect value.

ESP_Faye
Posts: 1641
Joined: Mon Oct 27, 2014 11:08 am

Re: system_get_vdd33() and the elusive 107th byte

Postby ESP_Faye » Wed Jul 29, 2015 7:17 pm

Hi,

Sorry that may confuse you, we will add this in our documentation.

If the 107th byte in esp_init_data_default.bin(0~127byte) is an ineffective value which in [0, 18) or (36, 255), ESP8266 RF calibration will use 3.3V by default.

Thanks for your interest in Espressif Systems and ESP8266 !

blubb
Posts: 111
Joined: Mon Jun 22, 2015 5:35 am

Re: system_get_vdd33() and the elusive 107th byte

Postby blubb » Wed Jul 29, 2015 8:03 pm

Thank you very much. Can you please answer my question about VDD measurement as well?

I use system_get_vdd33(), but it returns 65535 all the time.

Yesterday I looked through some other projects. In nodemcu they use readvdd33() which obviously is defined in libphy.a. There is no documentation of this function, however, it seems to work! Here it returns values between 3388 and 3392. Are these Millivolts or 1/1024 Volts? Why is there no documentation? And why does readvdd33() work and system_get_vdd33() does not?

ESP_Faye
Posts: 1641
Joined: Mon Oct 27, 2014 11:08 am

Re: system_get_vdd33() and the elusive 107th byte

Postby ESP_Faye » Fri Jul 31, 2015 10:54 am

Hi,

To use system_get_vdd33, has to be
1. TOUT pin is suspended
2. The 107th byte in esp_init_data_default.bin(0~127byte) is 0xFF

Thanks for your interest in Espressif Systems and ESP8266 !

nitro.tm
Posts: 4
Joined: Sun Dec 06, 2015 6:24 pm

Re: system_get_vdd33() and the elusive 107th byte

Postby nitro.tm » Fri Jan 15, 2016 8:08 pm

What do you mean by "TOUT is suspended"?

Do you mean the ADC pin must be floating in the circuit (not connected to anything)?

Is there anything else to do in the GPIO registers before calling system_get_vdd33()? I always get 0.

ESP_Faye
Posts: 1641
Joined: Mon Oct 27, 2014 11:08 am

Re: system_get_vdd33() and the elusive 107th byte

Postby ESP_Faye » Wed Jan 20, 2016 5:04 pm

Hi,

system_get_vdd33() can be used to measure the power voltage of VDD3P3 pin 3 and 4.
To use it, has to be
1. TOUT pin has to be floating in the circuit (not connected to anything).
2. The 107th byte in esp_init_data_default.bin(0~127byte) is 0xFF.
3. RF is enabled.

Or maybe you could try it with another module ?

zhanggx9
Posts: 7
Joined: Fri Mar 02, 2018 11:11 pm

Re: system_get_vdd33() and the elusive 107th byte

Postby zhanggx9 » Wed Mar 07, 2018 10:02 am

Hi :D
I met the same problem, this is my solution.
Set the 107th byte to 0xFF in esp_init_default.bin, and download.
call system_get_vdd33() and it reads ADC value= 3379.

Hope is does some help.
BTW I use ESP01S, it seems the Tout pin is the same as ESP01.

Who is online

Users browsing this forum: No registered users and 10 guests