You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The direct call inside my main task where all RMT stuff is done works, correctly. In my case, I have stepper motors which are driven by the RMT module, so when I do:
rmt_disable(channel);
rmt_enable(channel);
Everything works as expected, if the RMT was processing the transmission 1, it should move directly onto transmission 2.
The story is a bit different if I call my method...
I call the method inside the same task, instead of a direct call: cancel_rmt_transmission(channel)
And yes the transmission is stopped... but because my RMT drives my motors, I can clearly see that the motors now 'skip' all the other transmissions, instead of following the encoder data which I previously made for them, they just move onto the transmission for a split second, sharply jump into some random position and stop.
Steps to reproduce.
Create an RMT channel
Create a method to cancel the transmission like so:
Create a FreeRTOS Task which will handle RMT commands. Create a basic loop inside the task like so:
while (1)
{
if (xSemaphoreTake(semaphore, portMAX_DELAY) == pdTRUE)
{
//Create some condition on when to start a transmission and when to stop it
//This will work
rmt_disable(channel);
rmt_enable(channel);
//This won't
cancel_rmt_transmission(channel);
}
}
Debug Logs.
More Information.
Anyone has any idea what's going on here?
I am using the new 'rmt_tx.h' module introduced in ESP-IDF 5.0
The text was updated successfully, but these errors were encountered:
github-actionsbot
changed the title
RMT_TX Module Strange Behaviour When Enabling and Disabling Inside a Method.
RMT_TX Module Strange Behaviour When Enabling and Disabling Inside a Method. (IDFGH-14878)
Mar 18, 2025
I can't think of a reason why by calling the rmt_enable/disable directly makes difference from wrapping them inside another function... Maybe the issue locates in a difference place.
What do you mean by "skip"? is the next transmission picked up or not? How did you configure the transmission "loop_count"?
Can you strip your demo to only use a simple copy_encoder and transmit multiple transactions into a queue, calling disable/enable in another function, and attach your logic analyzer to see what is really happen.
Answers checklist.
IDF version.
ESP-IDF 5.4.0
Espressif SoC revision.
ESP32-S3
Operating System used.
Windows
How did you build your project?
VS Code IDE
If you are using Windows, please specify command line type.
PowerShell
Development Kit.
ESP32-S3-WROOM-1
Power Supply used.
USB
What is the expected behavior?
Both direct calls and method calls should work the same, at the end of the day, a method is only a fancy wrapper with a name.
Direct:
Method:
My RMT module should stop the current transmission and continue onto any other queued transmissions, which can be queued like so:
What is the actual behavior?
The direct call inside my main task where all RMT stuff is done works, correctly. In my case, I have stepper motors which are driven by the RMT module, so when I do:
Everything works as expected, if the RMT was processing the
transmission 1
, it should move directly ontotransmission 2
.The story is a bit different if I call my method...
I call the method inside the same task, instead of a direct call:
cancel_rmt_transmission(channel)
And yes the transmission is stopped... but because my RMT drives my motors, I can clearly see that the motors now 'skip' all the other transmissions, instead of following the encoder data which I previously made for them, they just move onto the transmission for a split second, sharply jump into some random position and stop.
Steps to reproduce.
Debug Logs.
More Information.
Anyone has any idea what's going on here?
I am using the new 'rmt_tx.h' module introduced in ESP-IDF 5.0
The text was updated successfully, but these errors were encountered: