06_sntp example aborts

slcasner
Posts: 17
Joined: Tue Dec 06, 2016 8:08 pm

06_sntp example aborts

Postby slcasner » Wed Dec 07, 2016 11:23 pm

I am just beginning to explore the ESP32 DEVKIT-C module before working on a project. I'm using ESP-IDF v1.0 on Mac OS X for my development environment. I have successfully built and run the 01_hello_world, 02_blink, and 03_http_request examples, as well as the unmodified app cloned from esp-idf-template.git. The latter two connected to my WiFi network successfully. However, when I try to run the 06_sntp example app, it continuously aborts and reboots as shown below when trying to init WiFi. This is with an unmodified copy of the example app directory with just the serial port name, SSID and password configuration changed. I also tried ticking the WiFi option ON in the ESP32-specific config section, but the result was the same. What might I be doing wrong?

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0008,len:0
load:0x3ffc0008,len:1964
load:0x40078000,len:3668
load:0x40080000,len:260
entry 0x40080034
I (1110) heap_alloc_caps: Initializing heap allocator:
I (1111) heap_alloc_caps: Region 19: 3FFC0EBC len 0001F144 tag 0
I (1122) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (1184) cpu_start: Pro cpu up.
I (1219) cpu_start: Single core mode
I (1258) cpu_start: Pro cpu start user code
I (1406) rtc: rtc v160 Nov 22 2016 19:00:05
I (1452) rtc: XTAL 40M
I (1631) phy: phy_version: 258, Nov 29 2016, 15:51:07, 0, 0
I (2157) cpu_start: Starting scheduler on PRO CPU.
I (2159) example: Boot count: 1
I (2159) example: Time is not set yet. Connecting to WiFi and getting time over NTP.
tcpip_task_hdlxxx : 3ffc4ad8, prio:18,stack:2048
I (2169) wifi: frc2_timer_task_hdl:3ffc653c, prio:22, stack:2048
W (2169) wifi: wifi_nvs_load: index mismatch, i=5 index=0

assertion "0 && "esp_wifi_init(&cfg)"" failed: file "XXX/sntp_main.c", line 129, function: initialise_wifi
Guru Meditation Error: Core   0 panic'ed (Unhandled debug exception)
Register dump:
PC      :  40056f2a  PS      :  00060936  A0      :  80081eb5  A1      :  3ffc3430  
A2      :  0000008d  A3      :  3f40389d  A4      :  3f4051d0  A5      :  3f40516c  
A6      :  00000081  A7      :  00000008  A8      :  00000000  A9      :  3ffc3370  
A10     :  0000008d  A11     :  3ffc100c  A12     :  00000000  A13     :  3f4038cb  
A14     :  00000001  A15     :  0000000f  SAR     :  00000014  EXCCAUSE:  00000001  
EXCVADDR:  00000000  LBEG    :  4000c28c  LEND    :  4000c296  LCOUNT  :  00000000  
Rebooting...

ESP_Sprite
Posts: 9025
Joined: Thu Nov 26, 2015 4:08 am

Re: 06_sntp example aborts

Postby ESP_Sprite » Thu Dec 08, 2016 1:30 am

Seems there's some NVS data from your previous attempts still in flash, and the NVS code fails on that... can you try erasing the entire flash using esptool.py and re-trying? That should resolve it.

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: 06_sntp example aborts

Postby ESP_igrr » Thu Dec 08, 2016 2:57 am

Hold on! If you haven't erased flash yet, please run this first:

Code: Select all

$IDF_PATH/components/esptool_py/esptool/esptool.py --port /dev/tty.SLAB_USBtoUART --baud 921600 read_flash 0x9000 0x6000 /tmp/dump_nvs.bin
And post /tmp/dump_nvs.bin here.
This way we can actually figure out what the bug is :)
Afterwards you can erase the flash using erase_flash command as ESP_Sprite has suggested above.
Thanks.

slcasner
Posts: 17
Joined: Tue Dec 06, 2016 8:08 pm

Re: 06_sntp example aborts

Postby slcasner » Thu Dec 08, 2016 6:14 am

Thanks for the quick response. Attached is the dump_nvs.bin file that you requested, but note that I had to add an additional fake ".pdf" extension because the forum considers .bin to be an invalid file type. Just rename the file to remove that fake extension.

After running the read_flash command you provided, I ran erase_flash the same way. That claimed to be successful in 3.6s, but sadly it did not fix the problem with the WiFi init aborting.
Attachments
dump_nvs.bin.pdf
(24 KiB) Downloaded 733 times

Wurzbart
Posts: 4
Joined: Sat Dec 03, 2016 7:39 pm

Re: 06_sntp example aborts

Postby Wurzbart » Thu Dec 08, 2016 8:31 am

I had also problems with this example and the NVS. A sleep directly after the Deepsleep call solved my problems.

slcasner
Posts: 17
Joined: Tue Dec 06, 2016 8:08 pm

Re: 06_sntp example aborts

Postby slcasner » Thu Dec 08, 2016 8:06 pm

Thanks for that suggestion, but in my case the abort occurs as the app first starts and tries to obtain_time(), so it never even reaches the esp_deep_sleep() call.

slcasner
Posts: 17
Joined: Tue Dec 06, 2016 8:08 pm

Re: 06_sntp example aborts

Postby slcasner » Fri Dec 16, 2016 8:12 pm

Did the dump_nvs.bin file that I collected provide any clues to the problem?

Who is online

Users browsing this forum: No registered users and 61 guests