Hi guys! When using wifi stack code fastled hangs in a minute.

@X-WL1 thanks for trying Sam’s code too, at least it helps rule out some issues.
Sorry about my bad printf suggestion, I forgot to warn you that you can’t use them in interrupt handlers like Daniel just pointed out.
I’m still at a loss why you’re getting a full hang on ESP32 though, the whole point of the watchdog is to catch hangs.
Seems that the hypervisor is misbehaving underneath your code.
Found a similar complaint here though, so they do seem to happen: https://community.platformio.org/t/nvs-flash-init-hang-on-esp32/3586
To be super clear, though you’re sure you don’t have power issues and that your ESP32 is powered separately from the LEDs (adding Wifi uses more power and could otherwise put you over the the edge)

@Marc_MERLIN ESP 32 is powered by the power supply according to the following principle: https://youtu.be/letCT3vq8V4?t=134
This connection made it possible to avoid flickering. I have a very difficult situation with them(
But even if I use another esp 32 on USB - still hangs Fastlend.
The problem is very similar to this: https://youtu.be/letCT3vq8V4?t=134
Only the solutions proposed don’t work for me.

@Daniel_Garcia In any case, after an error in this function, the code stops working-_-

@X-WL1 given that you’re getting unexplained problems

  1. your voltage shift trick is likely why Yves’ library flickers. I definitely had flickering before using proper level shifters. Yes, they are a pain, but I wasted even more time by trying not to use them
  2. given that you are having unexplained issues, I would go back to a supported setup .

Did you try running your ESP32 disconnected from this unusual power system and its LEDs, so just the ESP32 running with “I’m still working” printf in your loop() and wifi? You won’t get output but you’ll get wifi running, serial debugging over USB and you can see if that still hangs.

@Marc_MERLIN in addition to the ESP power trick, I use level shifter, capacitors, ethernet cables, and TV to transmit the signal. After that, the flickers remained only at one output, which was corrected by adding a ferrite ring to the data line. I don’t understand why this is happening - but it at least works O_o
Как я уже сказал, загрузка на другую плату от MH-et Live и работа с ней только через USB приводит к тому же результату.

@X-WL1 so which library are you using now?
Can you confirm that by changing/fixing the power it fixed your ESP32 hang?
Sorry if I didn’t understand everything you wrote.

@Marc_MERLIN I used the latest library from Sam and returned to release 3.2.1. The problem is not solved by changing the voltage source and is not dependent on it. I’ve seen FastLED problems have the same problem, but I can’t find it now. There it was assumed that this was due to the higher priority of the WiFi process.

@X-WL1 so basically it went away but you’re not sure why. bummer :-/

@Marc_MERLIN The problem with stopping is not solved. With the help of tricks solved only the problem of flickering for fastled branches.
Now: When you use a branch of FastLED I get stop / while using the branch Yves I get flicker.
Maybe blame the diodes or the PCB from MH-ET, but this is crazy((

@X-WL1 and to be clear, you are using proper level shifters 74HC245 or equivalent with Yves’ code? What components are you using? Can you give a diagram maybe?
If you are working with Yves’ code but you are only getting flickering, you are very close to being ok, it’s probably just a voltage level issue (it was for me)

@Marc_MERLIN I am using 74HC245N level shifter.I will depict the detailed scheme later and try again the Yves branch.
Thanks for the support!