Debugging Techniques for FreeRTOS on ESP32 in Real-Time Sensor Monitoring Applications

Hey guys I'm developing a real-time application using FreeRTOS on ESP32 to monitor temperature and humidity sensors. The system is experiencing frequent crashes and unpredictable behavior, especially when multiple sensors are being read simultaneously. I suspect improper task synchronization and memory allocation might be the culprits. I've followed the FreeRTOS documentation for task creation and scheduling, but sensor data seems to be missed occasionally, and control commands sometimes fail to execute. Are there any advanced debugging techniques or tools specifically designed for FreeRTOS on ESP32 that can help identify and resolve these issues more effectively? I'd appreciate any guidance on ensuring proper memory allocation and management within a multitasking environment to avoid stack overflows and heap fragmentation @Middleware & OS
Solution:
Perhaps you need to step back and look at your priorties, threads and critical sections if any. In any case you are trying to fix too much at once. Pick one then the next I would say.
Jump to solution
1 Reply
Solution
ZacckOsiemo
ZacckOsiemo2mo ago
Perhaps you need to step back and look at your priorties, threads and critical sections if any. In any case you are trying to fix too much at once. Pick one then the next I would say.
Want results from more Discord servers?
Add your server