Search found 107 matches

by blubb
Wed Aug 15, 2018 8:11 am
Forum: ESP8266 SDK
Topic: LoadStoreErrorCause help
Replies: 4
Views: 469

Re: LoadStoreErrorCause help

You have to read 4 bytes at once always. If you try to read only 1 or 2, a crash is normal behavior.
by blubb
Wed Aug 08, 2018 6:51 pm
Forum: ESP8266 SDK
Topic: Measuring Battery Life
Replies: 7
Views: 236

Re: Measuring Battery Life

Then just write

system_get_vdd33() * 1000L / 1024

Same result (because 1 << 10 == 2 ^ 10 == 1024)
by blubb
Thu Aug 02, 2018 12:26 am
Forum: ESP8266 SDK
Topic: Measuring Battery Life
Replies: 7
Views: 236

Re: Measuring Battery Life

system_get_vdd33() directly measures the supply voltage. No other pins are required for this. The SDK manual also says that TOUT pin needs to be suspended. I am using the very simple ESP-01 modules. I have no idea what they did to that pin, but it works just fine.
by blubb
Wed Aug 01, 2018 8:37 pm
Forum: ESP8266 SDK
Topic: Measuring Battery Life
Replies: 7
Views: 236

Re: Measuring Battery Life

Why not just try it?

The 107th (0x6B) byte has to be 0xFF.
system_get_vdd33() returns the voltage in 1/1024 Volt.

So calculate system_get_vdd33() * 1000L >> 10 to get the battery voltage in mV.

It works here... (ESP-01)
by blubb
Wed Jul 11, 2018 5:12 pm
Forum: ESP8266 SDK
Topic: SPI Erase Sector OTA
Replies: 4
Views: 237

Re: SPI Erase Sector OTA

You can only write zeros (0) into a flash memory. If you need to put a one (1) into a bit that was zero before, you have to erase the whole block and after that zero out the bits that need to be zero. Erasing is a totally different from writing. That is the short summary of how all flash memories wo...
by blubb
Tue Jul 10, 2018 5:36 pm
Forum: ESP8266 SDK
Topic: SPI Erase Sector OTA
Replies: 4
Views: 237

Re: SPI Erase Sector OTA

That is for technical reasons. In flash memory only zeros can be written as single bits.
https://en.wikipedia.org/wiki/Flash_mem ... ck_erasure
by blubb
Fri Jun 22, 2018 9:47 pm
Forum: General Q&A
Topic: What determines the properties of the SPI flash: hardware or software ?
Replies: 2
Views: 1234

Re: What determines the properties of the SPI flash: hardware or software ?

You have to set the values according to your hardware. The chip reads the values in a fail-safe default mode upon boot and then switches to the given mode. Likewise it expects the images to be at the positions based on your flash map setting. https://github.com/espressif/esptool/wiki/Firmware-Image-...
by blubb
Sun Jun 10, 2018 11:53 pm
Forum: ESP8266 SDK
Topic: [solved] Network found by wifi_station_scan() but "no Network found, reconnect after 1s"
Replies: 3
Views: 235

Re: Network found by wifi_station_scan() but "no Network found, reconnect after 1s"

Local non-static variables are not initialized, which typically means they contain garbage. struct station_config has more fields than ssid and password. Try stationConfig.bssid_set = 0; Edit: But it is better to zero out the whole thing first- for future compatibility. They added even more fields i...
by blubb
Wed Apr 25, 2018 2:02 am
Forum: ESP8266 SDK
Topic: Suppressing WiFi diagnostic messages
Replies: 2
Views: 229

Re: Suppressing WiFi diagnostic messages

Have you tried this?

system_set_os_print(0);
by blubb
Thu Apr 12, 2018 5:33 pm
Forum: General Q&A
Topic: Which "sleep mode" is best for this purpose?
Replies: 1
Views: 723

Re: Which "sleep mode" is best for this purpose?

If you send every 15 seconds, it is better to keep the wifi connection. How long does it take to reconnect? Try it.

You also need a timer, so modem sleep would be the best solution (the clock is halted in the higher sleep modes).

Go to advanced search