-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core 1 panic'ed (Cache disabled but cached memory region accessed) / Usermod #3644
Comments
Please use debug build and exception decoder. |
Could it be due to this: #2518 (comment) Will look into debug! |
That's for newer core. We never switched to it for classic ESP32. |
Using ISR requires special programming. Consult Espressif documentation. |
Tried to use IRAM_ATTR but keep getting So now I tried something else for testing purposes (using the blocking
Compiles ok, but WLED won't start. When I comment out applyPreset=3 it WLED starts and reading the PWM input works as well... Really not sure where to look anymore now. |
Hmmm, adding a |
Hi, a few thoughts, maybe it help you with writing your usermod.
This is blocking the WLED main loop for up to one second. Your usermod should not block for more than 50ms, otherwise strange things will happen (like watchdog abort).
bad idea, see above. Try to keep the "blocking time" of your usermod as low as possible.
If you want to use an ISR, it must have
This is why IRAM_ATTR is strictly necessary for any ISR.
why do you need |
This was just for testing purposes. And it actually looked like to work. Almost. ;-)
This was because of something I noticed in other usermods (applyPreset looked to break stuff at startup). But again for testing purposes. And actually the first time I did it, everything work like expected. For once. After a new compile it was broken and I couldn't reproduce...
This is still the way I want to fix it. But what should be global/static? I have two ISR's, which are static. But when I give them
I really don't know and did remove it already. ;-) |
Its some time since I wrote ISR stuff for esp32, so I don't have all the details, sorry. In principle, you would move your ISR functions out of the scope of your usermod instance - "static" class members are not the same as static functions. So you'd define ISR functions at the beginning of the file, before This also means that all variables you need for communication (like StartTimeChan2) must be defined before |
Cool, that was exactly what I was doing right now. And yes... the IRAM_ATTR gives no compile errors. Not working either yet, but hey, at least we have some new progression. Sort of... ;-) Thanks! |
One last hint
micros() will roll over very often, so doing |
This is so frustrating. With your help I managed to make it work. But two lines were in the wrong order. I applied the preset before I changed the variable which the From:
to:
|
And again this crap:
While it worked before... Not sure what to do now? Tried everything from erasing, overwriting through the web based install. |
Don't know why it works now. But it did. https://www.youtube.com/watch?v=i5QmDhw-LAM Still don't know why platformio is compiling as it should and WLED won't run. Either with the reboot loop or without anything on serial nor wifi nor AP... |
And even with 8 presets. Really cool imo: https://www.youtube.com/watch?v=Q7T4zfhyXw0&t |
What happened?
Trying to make a usermod to read PWM input from a RC receiver to change presets. Managed to read the PWM input and print it to serial. But when I add
addPreset(1)
the ESP32 hang with the following error message in serial console:Really don't know why. Please advise.
To Reproduce Bug
Compile usermod and change to ThePreset 3 in current usermod.
Expected Behavior
The ESP32 hang with the error message.
Install Method
Self-Compiled
What version of WLED?
WLED 0.14.0
Which microcontroller/board are you seeing the problem on?
ESP32
Relevant log/trace output
Anything else?
This is the code of the current usermod:
Code of Conduct
The text was updated successfully, but these errors were encountered: