How to make RMT RX done with count of signals? #11769
Replies: 1 comment
-
@DavidHan1998 - This seems to be a question about IDF and not about Arduino API. You may try to check the IDF 5.4.1 (compatible with Arduino Core 3.0.3) examples: It is also possible to ask about it directly in the ESP-IDF issue area: Another option would be to try to implement it using the Arduino Core API created to deal with RMT. I'll move this issue to discussions because it is not related to ESP32 Arduino Core code. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Board
ESP32 C3
Device Description
ESP32 C3
Hardware Configuration
default
Version
v3.0.3
Type
Question
IDE Name
Arduino IDE
Operating System
Windows10
Flash frequency
80MHz
PSRAM enabled
no
Upload speed
921600
Description
I use two types of RMT RX setup. One is for legacy driver, the other is new driver.
In legacy driver, I used ringbuffer to collect RMT RX data. The handling data part is
rmt_item32_t* items = (rmt_item32_t*)xRingbufferReceive(signal_rb, &size, 0);
if (items)
process data
In new driver, I used interrupt and task notify to enter handling part.
uint32_t got = ulTaskNotifyTake(pdTRUE, pdMS_TO_TICKS(1));
if (got > 0)
process data
The signals that I'd like to collect has a pattern like
15µs 30µs 45µs 22.5µs 15µs 15µs 22.5µs ... 22.5µs 200µs(end).
However, in the two drivers, I can only process data whenever a long end occur or when a block is full. But I need to process first 8 signals as soon as possible so it should process data whenever 8 signals are received. How to achieve this goal? (No matter in legacy driver or new driver is well.)
Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
Beta Was this translation helpful? Give feedback.
All reactions