You can chat about native SDK questions and issues here.

User avatar
By wb8wka
#67621 I am using SDK 1.3/ arduino 2.0.0 so I can use wifi. I want to optimize power. After the packet is sent, the 6 highest pulses, the ESP8266 stays powered up for 100ms. I have attached current plot at bottom How can I reduce this time?



wifi_set_channel(11);
delay(2); // Delay in MS
wifi_send_pkt_freedom(packet, 68, 0); // (Send 6 times)
ESP.deepSleep(6000000, WAKE_NO_RFCAL); // Sleep for 6 seconds, WAKE_RF_DEFAULT

061517_1Ohm_100mvDiv.png
You do not have the required permissions to view the files attached to this post.
User avatar
By QuickFix
#67687 Never really used it, but maybe you want to give it a try (since you have the equipment to test and I don't). ;)

Have you tried the forceSleepBegin() function yet, which will only put the WiFi-RF portion to sleep?
Code: Select allWiFi.forceSleepBegin(); // turn off ESP8266 RF
delay(1);               // give RF section time to shutdown

I believe you should reset the watchdog timer every once in a while in your loop, to prevent the board to think it's hanging.
Code: Select allwdt_reset();
User avatar
By wb8wka
#67925 I found a function that EspressIF told me would work:

system_deep_sleep_instant(x)

But I can't seem to call it from the Arduino. Any thoughts how to make system calls from Arduino?

ExpressIF sent me this, system_deep_sleep_instant is discussed on page 6

http://www.espressif.com/sites/default/ ... ons_en.pdf
User avatar
By wb8wka
#68020 OK, so to answer my own question, just including the prototype allowed me to call it, I,e,

void system_deep_sleep_instant(uint32 time_in_us);

However, it would on work in versions after 2.0.0

The problem with that is WAKE_NO_RFCAL doesn't work after 2.0.0 causing a big current spike

either this

ESP.deepSleep(6000000, WAKE_NO_RFCAL);

or this

system_deep_sleep_set_option(2);

won't shut it off

Thoughts?