Search found 13 matches

by adamwilt
Wed Feb 17, 2021 9:40 pm
Forum: ESP-IDF
Topic: esp_wifi_init() fails on ESP32-S2 WROVER; works on WROOM? (SOLVED)
Replies: 4
Views: 7225

Re: esp_wifi_init() fails on ESP32-S2 WROVER; works on WROOM?

Thank you! I already had "Make RAM allocatable using malloc() as well", but not

Code: Select all

Try to allocate memories of WiFi and LWIP in SPIRAM firstly. If failed, allocate internal memory
That did the trick! I'm up and running again and all is well with the world. :-)
Many thanks!
by adamwilt
Wed Feb 17, 2021 6:53 pm
Forum: ESP-IDF
Topic: esp_wifi_init() fails on ESP32-S2 WROVER; works on WROOM? (SOLVED)
Replies: 4
Views: 7225

Re: esp_wifi_init() fails on ESP32-S2 WROVER; works on WROOM?

Yes, I'm short on RAM (the ESP_ERR_NO_MEM is a bit of a clue, grin). The question is how, or why? There is nothing in my code's memory allocation that's different between using external RAM and not. The only thing different between these two cases is that I enable or disable "Support for external, S...
by adamwilt
Wed Feb 17, 2021 3:19 am
Forum: ESP-IDF
Topic: esp_wifi_init() fails on ESP32-S2 WROVER; works on WROOM? (SOLVED)
Replies: 4
Views: 7225

esp_wifi_init() fails on ESP32-S2 WROVER; works on WROOM? (SOLVED)

I have WI-FI STA and AP code working properly on an ESP32-S2 WROOM, but when I run it on a WROVER with the external RAM enabled, esp_wifi_init() fails with ESP_ERR_NO_MEM. The startup code for AP mode: ESP_ERROR_CHECK(esp_event_loop_create_default()); ESP_ERROR_CHECK(esp_event_handler_instance_regis...
by adamwilt
Fri Feb 05, 2021 5:59 am
Forum: Sample Code
Topic: esp32 s2 tinyUSB
Replies: 38
Views: 140722

Re: esp32 s2 tinyUSB

Interesting: when I build msc_disk.c into the tinyusb component itself (specifically, in components/tinyusb/tinyusb/src/class/msc, alongside msc_device.c), it compiles and links with only the error region `dram0_0_seg' overflowed by 11808 bytes If I then change the DISK_BLOCK_NUM to 4 instead of 2 *...
by adamwilt
Thu Feb 04, 2021 8:06 pm
Forum: Sample Code
Topic: esp32 s2 tinyUSB
Replies: 38
Views: 140722

Re: esp32 s2 tinyUSB

Whether I separate it out into its own component or leave it bundled with tusb_sample_msc in libmain.a, the result is exactly the same set of undefined references. (And, FWIW, I have successfully taken files in my own projects' main folders and turned them into separate components, and it's always w...
by adamwilt
Thu Feb 04, 2021 7:24 pm
Forum: Sample Code
Topic: esp32 s2 tinyUSB
Replies: 38
Views: 140722

Re: esp32 s2 tinyUSB

Its hard to say without more details how do you prepare and build project, which repository you are using etc. Maybe you are missing msc_disk.c in CMakeLists.txt Yes, that was my first thought; that would have been an easy fix! Sadly, I already have it included. I'm probably missing some simple opt...
by adamwilt
Thu Feb 04, 2021 12:28 am
Forum: Sample Code
Topic: esp32 s2 tinyUSB
Replies: 38
Views: 140722

Re: esp32 s2 tinyUSB

Trying to compile the tusb_sample_msc example, but all the tud_ xxx _cb callbacks in msc_disk.c show up as undefined references during the link phase: /Users/adamwilt/.espressif/tools/xtensa-esp32s2-elf/esp-2020r3-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-es...
by adamwilt
Wed Dec 23, 2020 4:03 am
Forum: ESP-IDF
Topic: Stopping / restarting WiFi leaks 32 (or 48) bytes?
Replies: 0
Views: 1936

Stopping / restarting WiFi leaks 32 (or 48) bytes?

I have code, based on the examples, that starts and stops the WiFi stack, tearing it down when stopped. Here's the code for AP mode: static esp_netif_t *_espNetif; void wifi_ap_start(int clients) { esp_event_loop_create_default(); esp_event_handler_instance_register(WIFI_EVENT, ESP_EVENT_ANY_ID, &ev...
by adamwilt
Wed Dec 23, 2020 3:46 am
Forum: ESP-IDF
Topic: OLED & Graphics Libraries
Replies: 5
Views: 13514

Re: OLED & Graphics Libraries

Check out u8g2: https://github.com/olikraus/u8g2 Using it in esp-idf: https://www.lucadentella.it/en/2017/10/30/esp32-25-display-oled-con-u8g2/ Here are the necessary "hal" files in the Kolban repository: https://github.com/nkolban/esp32-snippets/tree/master/hardware/displays/U8G2 The test files sho...
by adamwilt
Sun Dec 20, 2020 1:52 am
Forum: ESP-IDF
Topic: How do I stop wifi so that it can be successfully restarted? [SOLVED]
Replies: 0
Views: 3670

How do I stop wifi so that it can be successfully restarted? [SOLVED]

I'm trying to build wifi AP and STA modes that I can start and stop at will. I call esp_netif_init() once, at startup. Then I start up wifi using code similar to this simplified pseudocode: _espNetif = esp_netif_create_default_wifi_[ap|station](); esp_wifi_init(); esp_wifi_set_mode(); esp_wifi_set_c...