tcp performance example fail to start

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

tcp performance example fail to start

Postby newsettler_AI » Mon Nov 06, 2017 1:08 pm

Hi,

I'm trying to run this example:
https://github.com/espressif/esp-idf/tr ... erformance

I have configured my esp module as [STA, tcp-client, recv] and set my wifi router ssid and password.

When I flashed module, it is rebooting permanent.

Log from idf monitor:

Code: Select all

$ make monitor
MONITOR
--- idf_monitor on COM6 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5712
ho 0 tail 12 room 4
load:0x40078000,len:0
load:0x40078000,len:13760
entry 0x40079020
I (74) boot: Detected ESP32
I (34) boot: ESP-IDF v3.0-dev-1117-gabacf8d2 2nd stage bootloader
I (34) boot: compile time 14:44:12
I (34) boot: Enabling RNG early entropy source...
I (40) boot: SPI Speed      : 40MHz
I (44) boot: SPI Mode       : DIO
I (48) boot: SPI Flash Size : 4MB
I (52) boot: Partition Table:
I (56) boot: ## Label            Usage          Type ST Offset   Length
I (63) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (71) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (78) boot:  2 factory          factory app      00 00 00010000 00100000
I (86) boot: End of partition table
I (90) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0f9c0 ( 63936) map
I (121) esp_image: segment 1: paddr=0x0001f9e8 vaddr=0x3ffb0000 size=0x00628 (  1576) load
I (122) esp_image: segment 2: paddr=0x00020018 vaddr=0x400d0018 size=0x51878 (333944) map
0x400d0018: _stext at ??:?

I (244) esp_image: segment 3: paddr=0x00071898 vaddr=0x3ffb0628 size=0x02b30 ( 11056) load
I (248) esp_image: segment 4: paddr=0x000743d0 vaddr=0x40080000 size=0x00400 (  1024) load
0x40080000: _iram_start at E:/ESP32/TOOLS/esp-idf/components/freertos/xtensa_vectors.S:1685

I (251) esp_image: segment 5: paddr=0x000747d8 vaddr=0x40080400 size=0x10110 ( 65808) load
I (286) esp_image: segment 6: paddr=0x000848f0 vaddr=0x400c0000 size=0x00000 (     0) load
I (296) boot: Loaded app from partition at offset 0x10000
I (296) boot: Disabling RNG early entropy source...
I (298) cpu_start: Pro cpu up.
I (302) cpu_start: Starting app cpu, entry point is 0x40080f14
0x40080f14: call_start_cpu1 at E:/ESP32/TOOLS/esp-idf/components/esp32/cpu_start.c:222

I (0) cpu_start: App cpu up.
I (312) heap_init: Initializing. RAM available for dynamic allocation:
I (319) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (325) heap_init: At 3FFB8DE8 len 00027218 (156 KiB): DRAM
I (331) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (338) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (344) heap_init: At 40090510 len 0000FAF0 (62 KiB): IRAM
I (350) cpu_start: Pro cpu start user code
I (33) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (34) tcp_perf:: ESP_WIFI_MODE_STA
W (34) wifi: wifi nvs_open fail ret=4353

E (34) wifi: wifi_init 1413 ret=4353
ESP_ERROR_CHECK failed: esp_err_t 0x1101 at 0x401082f7
0x401082f7: wifi_init_sta at E:/ESP32/Projects/BASE/tcp_perf/main/tcp_perf.c:342

file: "E:/ESP32/Projects/BASE/tcp_perf/main/tcp_perf.c" line 247
func: wifi_init_sta
expression: esp_wifi_init(&cfg)

Backtrace: 0x400878f0:0x3ffba9f0 0x40087c55:0x3ffbaa10 0x401082f7:0x3ffbaa30 0x4010814b:0x3ffbab20 0x400d0f1f:0x
3ffbab50
0x400878f0: invoke_abort at E:/ESP32/TOOLS/esp-idf/components/esp32/panic.c:553

0x40087c55: _esp_error_check_failed at E:/ESP32/TOOLS/esp-idf/components/esp32/panic.c:565

0x401082f7: wifi_init_sta at E:/ESP32/Projects/BASE/tcp_perf/main/tcp_perf.c:342

0x4010814b: app_main at E:/ESP32/Projects/BASE/tcp_perf/main/tcp_main.c:131

0x400d0f1f: main_task at E:/ESP32/TOOLS/esp-idf/components/esp32/cpu_start.c:429


Rebooting...
ets Jun  8 2016 00:22:57

What did I miss in configuration?

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: tcp performance example fail to start

Postby WiFive » Mon Nov 06, 2017 3:12 pm

Call nvs_flash_init() at beginning of program

newsettler_AI
Posts: 121
Joined: Wed Apr 05, 2017 12:49 pm

Re: tcp performance example fail to start

Postby newsettler_AI » Mon Nov 06, 2017 5:30 pm

WiFive wrote:Call nvs_flash_init() at beginning of program
Thanks, it helped.

I have added:

Code: Select all

    esp_err_t ret = nvs_flash_init();
    if (ret == ESP_ERR_NVS_NO_FREE_PAGES) {
        ESP_ERROR_CHECK(nvs_flash_erase());
        ret = nvs_flash_init();
    }
in app_main at start and changed usb cable to more robust.
But still weird, usually, all idf examples worked fine without any additions.

Who is online

Users browsing this forum: No registered users and 51 guests