I'm hacking a project with ESP32-WROOM module. I'm running some timers with alarms along with some peripherals triggering ISRs. In the ISR routine I'm sending events to a queue, and receiving them in a task. Normally I'm seeing ~50 micros delay between ISR routine and the task.
I added the esp_log
component for logging to UART. If I call some ESP_LOGx
in the task after receiving the queue event, the aforementioned delay grows to 25 millis in some cases (depending on the amount of logging).
What's the reason? Does esp_log
have longish noInterrupt
sections internally? Is there any way to avoid them? Any other remedies?
Those delays are quire troublesome because on one hand I need logging to get things working. On other hand those delays turn all the timings upside down...
I actually switched to esp_log
form hand-rolled logger. In my logger I had a 5k fifo queue for log data. The logging calls would format strings and push them into the queue. A low priority task would pop the data and print it to the UART. It was much better in terms of performance. I switched to esp_log
for richer functionality, but ... Going back unless there is a fix.