Keep getting HUB: Stage failed: START error (ESP-IDF v5.0.6) [SOLVED]

crespan
Posts: 3
Joined: Wed May 08, 2024 1:42 pm

Keep getting HUB: Stage failed: START error (ESP-IDF v5.0.6) [SOLVED]

Postby crespan » Thu May 09, 2024 10:35 am

I get HUB: Stage failed: START error wehen inserting USB MSC while being connected to a mqtt server and with BLE (nimBLE) initialized and working:
  • while not connected to the mqtt server the USB is recognized and everything works.
  • if I don't call bluetooth_init, therefore disabling BLE, than USB works perfectly when inserted even during mqtt connection.
  • if i don't initialize my 3 buttons using the buttons component (v3.2.0) and my addressable led using the led_strip component (v.2.5.0), than the error i get is "USB_MSC: msc_host_install_device(367)", which seems to be related to the "usb_host_interface_claim()" method, but I'm not sure.
I think the problem might be related to stack or/and heap allocation, interrupt management, or something else managable from the menuconfig instaed of something regarding the code.

But if you think seeing my code would help you understand the issue better, i can provide the portion regarding what you need to see, keep in mind that my project includes:
  • EEPROM
  • LITTLEFS
  • LVGL (display and touchscreen)
  • digital IO such as buttons, 2 leds and 1 addressable led
  • BLE (NimBLE)
  • WI-FI (both AP and STA mode)
  • MQTT connection
  • WEBSOCKET server
  • MSC
Last edited by crespan on Thu May 09, 2024 1:10 pm, edited 1 time in total.

crespan
Posts: 3
Joined: Wed May 08, 2024 1:42 pm

Re: Keep getting HUB: Stage failed: START error (ESP-IDF v5.0.6)

Postby crespan » Thu May 09, 2024 1:09 pm

Solved (maybe)
Setting "Maximum malloc() size, in bytes, to always put in internal memory" from 16384 (the default value) to 512 seems to have fixed this, also I forgot to mention that i was using a ESP32-S3-WROOM-1-N8R2.

if you might have something to add to all of this I am more than happy to hear everything related to esp-idf development in general.

Who is online

Users browsing this forum: Fckx35056, Google [Bot] and 96 guests