Description
Board
ESP32 dev kit v1
Device Description
Classic esp32 wroom-32 devkit v1 with cp2102
Hardware Configuration
1 gpio connected to an external device
Version
v3.1.0
IDE Name
Arduino IDE
Operating System
Ubuntu 22.04
Flash frequency
40 mHz
PSRAM enabled
yes
Upload speed
921600
Description
Everything works but I need to know how to completely disable any RTOS background task EXCEPT the UART.
I made a sketch that sets an interrupt when a gpio changes then sends the timing as a single character (or 4) to the serial UART0.
Since the pulses on the gpio are coming at a very fast rate (up to 57 microseconds apart), as the pulse arrives and it's measured, I send it to the serial port. Everything works but every now and then (like 2 times in 30 seconds) I miss pulses and I get a delay of around 1.2 milliseconds!
It's not my program and it's not the source.
it's like there is something locking up the device for that time.
Is there a way to disable anything except the "Serial" ?
In the setup of my sketch I only have one single interrupt on the gpio rising edge.
The crazy thing is that I can easily get those pulses using an ft232r device (which unfortunately is more imprecise than the esp32).
I would love to do the same with the esp32 but it seems there is a problem.
Note:
if I use slower timings on the source device this happens less.
Note2:
I tried using a smaller transmit buffer 8,16,32 and 64 bytes .. they all work and they all have the same problem...
Sketch
Unfortunatey I can't provide the sketch. It would be too complex.
But there is a similar project called "Tapuino Next" which uses the same method.
They are unaware of the problem because the use slower speeds though.
Debug Message
There are no relevant debug messages to show.
Other Steps to Reproduce
I am not sure where the problem lies...
perhaps creating an interrupt every 60 microseconds and then send a single byte on the serial prot could trigger the problem.
I can try that if you can't provide a way to disable any background task (which would IMHO solve the problem)
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.