← index #15521PR #9685
Related · high · value 1.945
QUERY · ISSUE

RMT read pulses?

openby MarkHmnvopened 2024-07-22updated 2025-12-09
enhancementport-esp32

Description

The esp32.RMT has a method for sending pulses, but no method for reading them. I would like to know if there are plans to implement this functionality in the future?

Code Size

No response

Implementation

I hope the MicroPython maintainers or community will implement this feature

Code of Conduct

Yes, I agree

CANDIDATE · PULL REQUEST

ports/esp32/esp32_rmt.c: #7015 ISR-driven pulse generator in RMT

openby Andrei-Pozolotinopened 2022-10-20updated 2024-03-07
port-esp32

See: #7015

Design Motivation:

  1. store static pulse pattern inside RMT driver only once, as a "pulse vocabulary" of available stanzas
  2. keep playing "pulse words" from this RMT pulse store with different stanza size and frequency via ISR call back

Purpose: provide high performance ISR-driven pulse generator in RMT.

This adds 2 new functions to ports/esp32/esp32_rmt.c:

// RMT.store_pulses(self, item_list:list[int]) -> None
// RMT.issue_pulses(self, tx_ready_func:callable, item_index:int, item_count:int, clock_div:int) -> None

Use case and examples are discussed here:
https://github.com/micropython/micropython/issues/7015#issuecomment-933131381
https://github.com/micropython/micropython/issues/7015#issuecomment-1100161761

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied