Sometimes the interrupt responds late. #13128
Replies: 2 comments 1 reply
-
Update. I found the reason for the time drift. It happens when writing a json file. sayac.json:
Test file:
Output:
|
Beta Was this translation helpful? Give feedback.
-
Ah yes, there's been a couple of other recent discussions about slow file writes, it's a really common trap on all embedded platforms. For work projects I'll often write data / logs to a large ram buffer during processing, then just write that buffer to file once the unit is idle. You lose that data if the board crashes though, and it doesn't help if the unit is never idle. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I made a circuit made with esp32. It controls Nema 34 (stepper motor). If it receives a signal from the start sensor, the motor starts. If it receives a signal from the stop sensor, the motor stops. I used rmt to drive the stepper motor with pulses. Also, according to the set speed, the motor accelerates and decelerates ramped. Step motor controls the label machine.
main_0823.zip
I run the sensor inputs with pin.irq.
I use timer for motor ramp. It accelerates with 10ms interval steps. It has a maximum of 10 steps.
I use RMT for step motor pulse train
I have an interesting problem. At every 36th motor stop signal, the motor stop is delayed. It works about 300-500ms more than it should. I tried with pwm instead of rmt to see if maybe it is conflicting with rmt, spi or irq. The result is the same again
I don't know how to find error.
There was no such problem before.
I couldn't compile with the previous esp-idf version4.4.2, I saw this error:
Beta Was this translation helpful? Give feedback.
All reactions