Page 1 of 1

ESP32 S2 Solo2 "just stops"

Posted: Fri Apr 19, 2024 1:47 pm
by hdsjulian2
I am building a script using platformio, hw_timer_t, Arduino.h and involving esp_now.

During a receive callback registered with esp_now_recv_cb i'm simply doing a few memcpys and Serial.println's.
No matter how i switch them around. No matter whether i comment out the memcpys, my board just stops.
It doesn't coredump, it just ceases any output. I attached a LED to make sure it's not just the Serial somehow crashing. The entire board stops.
it happens around https://github.com/hdsjulian/sparkles/b ... ng.cpp#L44, but not necessarily on that line.
I've commented out every single line in this method to see if it's at fault. No avail.
My assumption is that somehow
- either Serial.println doesn't play nice with esp_now callback functions
- there is something with esp_now and hw_timer_t not working (but in the client portion of my script i had similar problems and no timer interrupt)
- i also had the same problem during an esp_now_send.

I am out of ideas of how to debug. What could it be that makes my board just stop without coredump?

Re: ESP32 S2 Solo2 "just stops"

Posted: Sat Apr 20, 2024 12:56 am
by ESP_Sprite
If anything, you shouldn't call any potentially 'long' / blocking things during the ESPNow callback. Normally, you'd quickly filter the package (as in discard it if it's uninteresting) and dump its relevant info in a freertos queue or something if you want to keep it, for another thread to process.