ESP32 SparkFun Thing - works with Arduino but not ESP32-IDF

rabarar
Posts: 4
Joined: Tue Jan 22, 2019 1:54 am

ESP32 SparkFun Thing - works with Arduino but not ESP32-IDF

Postby rabarar » Tue Jan 22, 2019 2:15 am

Is there anything specific that needs to be modified to make the ESP32 SparkFun Thing work with the ESP32 IDF?

When I flash the example code (for example the getting_started/softAP), the code builds, loads, and runs, but the code fails to work,.,

when I erase the flash, It appears that the ESP32 Thing works:

Code: Select all

Chip is ESP32D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 24:0a:c4:00:97:40
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.1s
Hard resetting via RTS pin...

and when I flash it works as expected:

Code: Select all

$ make -j4 flash
Toolchain path: /Users/robert/src/esp32/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from /Users/robert/src/esp32/esp-idf/requirements.txt are satisfied.
App "wifi_softAP" version: v3.3-beta1-223-ga62cbfec9-dirty
Flashing binaries to serial port /dev/tty.usbserial-DN028GCB (app at offset 0x10000)...
esptool.py v2.6-beta1
Serial port /dev/tty.usbserial-DN028GCB
Connecting.....
Chip is ESP32D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
MAC: 24:0a:c4:00:97:40
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 24160 bytes to 14459...
Wrote 24160 bytes (14459 compressed) at 0x00001000 in 1.3 seconds (effective 151.0 kbit/s)...
Hash of data verified.
Compressed 596848 bytes to 362279...
Wrote 596848 bytes (362279 compressed) at 0x00010000 in 32.2 seconds (effective 148.2 kbit/s)...
Hash of data verified.
Compressed 3072 bytes to 103...
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 1537.2 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

But when I run it, it appears to run but it fails to show an AP on any wifi device:

Code: Select all

[0;32mI (28) boot: compile time 20:47:46[0m
[0;32mI (36) boot: Enabling RNG early entropy source…[0m
[0;32mI (36) boot: SPI Speed      : 40MHz[0m
[0;32mI (38) boot: SPI Mode       : DIO[0m
[0;32mI (42) boot: SPI Flash Size : 4MB[0m
[0;32mI (46) boot: Partition Table:[0m
[0;32mI (50) boot: ## Label            Usage          Type ST Offset   Length[0m
[0;32mI (57) boot:  0 nvs              WiFi data        01 02 00009000 00006000[0m
[0;32mI (65) boot:  1 phy_init         RF data          01 01 0000f000 00001000[0m
[0;32mI (72) boot:  2 factory          factory app      00 00 00010000 00100000[0m
[0;32mI (80) boot: End of partition table[0m
[0;32mI (84) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x17440 ( 95296) map[0m
[0;32mI (126) esp_image: segment 1: paddr=0x00027468 vaddr=0x3ff80000 size=0x00000 (     0) load[0m
[0;32mI (127) esp_image: segment 2: paddr=0x00027470 vaddr=0x3ff80000 size=0x00000 (     0) load[0m
[0;32mI (133) esp_image: segment 3: paddr=0x00027478 vaddr=0x3ffb0000 size=0x02ca4 ( 11428) load[0m
[0;32mI (146) esp_image: segment 4: paddr=0x0002a124 vaddr=0x3ffb2ca4 size=0x00000 (     0) load[0m
[0;32mI (151) esp_image: segment 5: paddr=0x0002a12c vaddr=0x40080000 size=0x00400 (  1024) load[0m
[0;32mI (160) esp_image: segment 6: paddr=0x0002a534 vaddr=0x40080400 size=0x05adc ( 23260) load[0m
[0;32mI (178) esp_image: segment 7: paddr=0x00030018 vaddr=0x400d0018 size=0x66dcc (421324) map[0m
[0;32mI (326) esp_image: segment 8: paddr=0x00096dec vaddr=0x40085edc size=0x0ad3c ( 44348) load[0m
[0;32mI (345) esp_image: segment 9: paddr=0x000a1b30 vaddr=0x400c0000 size=0x00000 (     0) load[0m
[0;32mI (345) esp_image: segment 10: paddr=0x000a1b38 vaddr=0x50000000 size=0x00000 (     0) load[0m
[0;32mI (352) esp_image: segment 11: paddr=0x000a1b40 vaddr=0x50000000 size=0x00000 (     0) load[0m
[0;32mI (371) boot: Loaded app from partition at offset 0x10000[0m
[0;32mI (371) boot: Disabling RNG early entropy source…[0m
[0;32mI (373) cpu_start: Pro cpu up.[0m
[0;32mI (376) cpu_start: Application information:[0m
[0;32mI (381) cpu_start: Project name:     wifi_softAP[0m
[0;32mI (386) cpu_start: App version:      v3.3-beta1-223-ga62cbfec9-dirty[0m
[0;32mI (393) cpu_start: Compile time:     20:47:48[0m
[0;32mI (398) cpu_start: Compile date:     Jan 21 2019[0m
[0;32mI (404) cpu_start: ESP-IDF:          v3.3-beta1-223-ga62cbfec9-dirty[0m
[0;32mI (411) cpu_start: Starting app cpu, entry point is 0x40081028[0m
[0;32mI (0) cpu_start: App cpu up.[0m
[0;32mI (421) heap_init: Initializing. RAM available for dynamic allocation:[0m
[0;32mI (428) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM[0m
[0;32mI (434) heap_init: At 3FFB8C30 len 000273D0 (156 KiB): DRAM[0m
[0;32mI (440) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM[0m
[0;32mI (447) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM[0m
[0;32mI (453) heap_init: At 40090C18 len 0000F3E8 (60 KiB): IRAM[0m
[0;32mI (459) cpu_start: Pro cpu start user code[0m
[0;32mI (142) cpu_start: Starting scheduler on PRO CPU.[0m
[0;32mI (0) cpu_start: Starting scheduler on APP CPU.[0m
[0;32mI (305) wifi softAP: ESP_WIFI_MODE_AP[0m
[0;31mE (305) system_api: Base MAC address from BLK3 of EFUSE version error, version = 0[0m
[0;32mI (305) wifi softAP: failed to get mac: 266[0m
[0;32mI (305) wifi softAP: ESP_ERR_INVALID_VERSION[0m
I (315) wifi: wifi driver task: 3ffc0800, prio:23, stack:3584, core=0
I (325) wifi: wifi firmware version: 44ce2e2
I (325) wifi: config NVS flash: enabled
I (325) wifi: config nano formating: disabled
[0;32mI (335) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
[0;32mI (345) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE[0m
I (375) wifi: Init dynamic tx buffer num: 32
I (385) wifi: Init data frame dynamic rx buffer num: 32
I (385) wifi: Init management frame dynamic rx buffer num: 32
I (385) wifi: Init static rx buffer size: 1600
I (385) wifi: Init static rx buffer num: 10
I (395) wifi: Init dynamic rx buffer num: 32
[0;32mI (495) phy: phy_version: 4006, e540b8e, Dec 17 2018, 11:53:06, 0, 0[0m
I (505) wifi: mode : softAP (24:0a:c4:00:97:41)
I (505) wifi: Init max length of beacon: 752/752
I (505) wifi: Init max length of beacon: 752/752
[0;32mI (505) wifi softAP: wifi_init_softap finished.SSID:myssid password:mypassword[0m
Any insights greatly appreciated!

Best,
Rob

rabarar
Posts: 4
Joined: Tue Jan 22, 2019 1:54 am

Re: ESP32 SparkFun Thing - works with Arduino but not ESP32-IDF

Postby rabarar » Tue Jan 22, 2019 3:36 pm

SOLVED: modifying the XTAL Frequency to automatic resolves both the UART clock issue and the WiFi failure.

Who is online

Users browsing this forum: Majestic-12 [Bot] and 119 guests