kopia lustrzana https://github.com/espressif/esp-idf
rmt: update doc for esp32s3
rodzic
01a28add47
commit
e58f53f265
|
@ -103,6 +103,10 @@ There couple of typical steps to setup and operate the RMT and they are discusse
|
||||||
|
|
||||||
The RMT has four channels numbered from zero to three. The first half (i.e. Channel 0 ~ 1) channels can only be configured for transmitting, and the other half (i.e. Channel 2 ~ 3) channels can only be configured for receiving. They are referred to using indexes defined in structure :cpp:type:`rmt_channel_t`.
|
The RMT has four channels numbered from zero to three. The first half (i.e. Channel 0 ~ 1) channels can only be configured for transmitting, and the other half (i.e. Channel 2 ~ 3) channels can only be configured for receiving. They are referred to using indexes defined in structure :cpp:type:`rmt_channel_t`.
|
||||||
|
|
||||||
|
.. only:: esp32s3
|
||||||
|
|
||||||
|
The RMT has eight channels numbered from zero to seven. The first half (i.e. Channel 0 ~ 3) channels can only be configured for transmitting, and the other half (i.e. Channel 4 ~ 7) channels can only be configured for receiving. They are referred to using indexes defined in structure :cpp:type:`rmt_channel_t`.
|
||||||
|
|
||||||
Configure Driver
|
Configure Driver
|
||||||
----------------
|
----------------
|
||||||
|
|
||||||
|
@ -144,7 +148,7 @@ When configuring channel in transmit mode, set **tx_config** and the following m
|
||||||
* Level of the RMT output, when the carrier is applied - **carrier_level**
|
* Level of the RMT output, when the carrier is applied - **carrier_level**
|
||||||
* Enable the RMT output if idle - **idle_output_en**
|
* Enable the RMT output if idle - **idle_output_en**
|
||||||
* Set the signal level on the RMT output if idle - **idle_level**
|
* Set the signal level on the RMT output if idle - **idle_level**
|
||||||
:esp32s2: * Specify maximum number of transmissions in a loop - **loop_count**
|
:SOC_RMT_SUPPORT_TX_LOOP_COUNT: * Specify maximum number of transmissions in a loop - **loop_count**
|
||||||
|
|
||||||
Receive Mode
|
Receive Mode
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
|
@ -156,10 +160,10 @@ In receive mode, set **rx_config** and the following members of :cpp:type:`rmt_r
|
||||||
* Enable a filter on the input of the RMT receiver - **filter_en**
|
* Enable a filter on the input of the RMT receiver - **filter_en**
|
||||||
* A threshold of the filter, set in the number of ticks - **filter_ticks_thresh**. Pulses shorter than this setting will be filtered out. Note, that the range of entered tick values is [0..255].
|
* A threshold of the filter, set in the number of ticks - **filter_ticks_thresh**. Pulses shorter than this setting will be filtered out. Note, that the range of entered tick values is [0..255].
|
||||||
* A pulse length threshold that will turn the RMT receiver idle, set in number of ticks - **idle_threshold**. The receiver will ignore pulses longer than this setting.
|
* A pulse length threshold that will turn the RMT receiver idle, set in number of ticks - **idle_threshold**. The receiver will ignore pulses longer than this setting.
|
||||||
:esp32s2: * Enable the RMT carrier demodulation - **carrier_rm**
|
:SOC_RMT_SUPPORT_RX_DEMODULATION: * Enable the RMT carrier demodulation - **carrier_rm**
|
||||||
:esp32s2: * Frequency of the carrier in Hz - **carrier_freq_hz**
|
:SOC_RMT_SUPPORT_RX_DEMODULATION: * Frequency of the carrier in Hz - **carrier_freq_hz**
|
||||||
:esp32s2: * Duty cycle of the carrier signal in percent (%) - **carrier_duty_percent**
|
:SOC_RMT_SUPPORT_RX_DEMODULATION: * Duty cycle of the carrier signal in percent (%) - **carrier_duty_percent**
|
||||||
:esp32s2: * Level of the RMT input, where the carrier is modulated to - **carrier_level**
|
:SOC_RMT_SUPPORT_RX_DEMODULATION: * Level of the RMT input, where the carrier is modulated to - **carrier_level**
|
||||||
|
|
||||||
Finalize Configuration
|
Finalize Configuration
|
||||||
^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@ -207,6 +211,11 @@ Another way to provide data for transmission is by calling :cpp:func:`rmt_fill_t
|
||||||
Receive Data
|
Receive Data
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
.. only:: esp32
|
||||||
|
|
||||||
|
.. warning::
|
||||||
|
RMT RX channel can't receive packet whose items are larger than its memory block size. If you set the memory block number to 1, then this RX channel can't receive packet with more than 64 items. This is a hardware limitation.
|
||||||
|
|
||||||
.. only:: esp32
|
.. only:: esp32
|
||||||
|
|
||||||
Before starting the receiver we need some storage for incoming items. The RMT controller has 512 x 32-bits of internal RAM shared between all eight channels.
|
Before starting the receiver we need some storage for incoming items. The RMT controller has 512 x 32-bits of internal RAM shared between all eight channels.
|
||||||
|
@ -219,6 +228,10 @@ Receive Data
|
||||||
|
|
||||||
Before starting the receiver we need some storage for incoming items. The RMT controller has 192 x 32-bits of internal RAM shared between all four channels.
|
Before starting the receiver we need some storage for incoming items. The RMT controller has 192 x 32-bits of internal RAM shared between all four channels.
|
||||||
|
|
||||||
|
.. only:: esp32s3
|
||||||
|
|
||||||
|
Before starting the receiver we need some storage for incoming items. The RMT controller has 384 x 32-bits of internal RAM shared between all eight channels.
|
||||||
|
|
||||||
In typical scenarios it is not enough as an ultimate storage for all incoming (and outgoing) items. Therefore this API supports retrieval of incoming items on the fly to save them in a ring buffer of a size defined by the user. The size is provided when calling :cpp:func:`rmt_driver_install` discussed above. To get a handle to this buffer call :cpp:func:`rmt_get_ringbuf_handle`.
|
In typical scenarios it is not enough as an ultimate storage for all incoming (and outgoing) items. Therefore this API supports retrieval of incoming items on the fly to save them in a ring buffer of a size defined by the user. The size is provided when calling :cpp:func:`rmt_driver_install` discussed above. To get a handle to this buffer call :cpp:func:`rmt_get_ringbuf_handle`.
|
||||||
|
|
||||||
With the above steps complete we can start the receiver by calling :cpp:func:`rmt_rx_start` and then move to checking what's inside the buffer. To do so, you can use common FreeRTOS functions that interact with the ring buffer. Please see an example how to do it in :example:`peripherals/rmt/ir_protocols`.
|
With the above steps complete we can start the receiver by calling :cpp:func:`rmt_rx_start` and then move to checking what's inside the buffer. To do so, you can use common FreeRTOS functions that interact with the ring buffer. Please see an example how to do it in :example:`peripherals/rmt/ir_protocols`.
|
||||||
|
|
Ładowanie…
Reference in New Issue