ESP8266 Developer Zone The Official ESP8266 Forum 2017-08-02T02:51:11+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=5784 2017-08-02T02:51:11+08:00 2017-08-02T02:51:11+08:00 https://bbs.espressif.com:443/viewtopic.php?t=5784&p=14944#p14944 <![CDATA[Re: Low power modes; deep sleep and modem sleep]]> Statistics: Posted by Daven007 — Wed Aug 02, 2017 2:51 am


]]>
2017-07-31T14:13:51+08:00 2017-07-31T14:13:51+08:00 https://bbs.espressif.com:443/viewtopic.php?t=5784&p=14916#p14916 <![CDATA[Re: Low power modes; deep sleep and modem sleep]]> Not sure about the exception. Seems like you are loading data from an address that is not inside an addresseable location.

Statistics: Posted by Guest — Mon Jul 31, 2017 2:13 pm


]]>
2017-07-29T21:07:32+08:00 2017-07-29T21:07:32+08:00 https://bbs.espressif.com:443/viewtopic.php?t=5784&p=14895#p14895 <![CDATA[Low power modes; deep sleep and modem sleep]]>
a) I use this function to enter deep sleep:

Code:

static void ICACHE_FLASH_ATTR gotoSleep(void) {
   TESTP("Sleep %dS\n", sysCfg.updates);
   system_deep_sleep_set_option(RF_DISABLED); // 4
   system_deep_sleep(sysCfg.updates * 1000 * 1000);
   os_delay_us(100);
}

However WiFi (and RF) still are enabled when the unit restarts. E.g. dhcp & ip address etc are reported. I'd have thought that with RF disabled WiFI wouldn't have been started.

b) I lieu of this I'm using modem sleep to minimise the current while doing the work. I use this code to enter modem sleep mode:

Code:

      wifi_station_disconnect();
      wifi_set_opmode(NULL_MODE);
      wifi_fpm_open();
      wifi_fpm_set_sleep_type(MODEM_SLEEP_T);
      wifi_fpm_open();
      wifi_fpm_set_wakeup_cb(fpm_wakup_cb);
      wifi_fpm_do_sleep(0xFFFFFFF);


This works most of the time but every so often I get an exception when restarting:

scandone
del if0
usl
mode : null
fpm open,type:2 0
force slp enable,type: 2
reconnect
Fatal exception 28(LoadProhibitedCause):
epc1=0x4000df2f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000033, depc=0x00000000
ÿ
ets Jan 8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 28496, room 16
tail 0
chksum 0x39
load 0x3ffe8000, len 2113, room 8
tail 9
chksum 0x9b
ho 0 tail 9 room 7
load 0x3ffe8850, len 5884, room 15
tail 13
chksum 0x98
csum 0x98

Nb 0x4000df2f is in the memcmp routine

What am I missing? Any ideas please?

Statistics: Posted by Daven007 — Sat Jul 29, 2017 9:07 pm


]]>