https://github.com/bang-olufsen/esp32-rmt-uart
UART over RMT implementation for the Classics Adapter
https://github.com/bang-olufsen/esp32-rmt-uart
Last synced: about 2 months ago
JSON representation
UART over RMT implementation for the Classics Adapter
- Host: GitHub
- URL: https://github.com/bang-olufsen/esp32-rmt-uart
- Owner: bang-olufsen
- License: mit
- Created: 2024-02-26T09:38:20.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-10T13:23:01.000Z (11 months ago)
- Last Synced: 2025-01-27T22:58:28.518Z (4 months ago)
- Language: C
- Size: 16.6 KB
- Stars: 1
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ESP32 RMT UART
Component for Espressif ESP32 ESP-IDF framework.
This components uses ESP32's RMT peripheral as an UART port. It can send and receive UART frames as well.
## Supported versions of frameworks and devices
| Chip | Framework | Versions | Number of UART
|----------------|--------------------|------------|----------
| ESP32-S2 | ESP-IDF | v4.3 and above | 2
| ESP32-C3 | ESP-IDF | v4.3 and above | 2
| ESP32-S3 | ESP-IDF | v4.3 and above | 4## How to Use
Clone this repository to your project components directory.## Configuration
```c
typedef struct {
int baud_rate; /*!< UART baud rate*/
rmt_uart_mode_t mode; /*!< UART mode*/
rmt_uart_word_length_t data_bits; /*!< UART byte size*/
rmt_uart_parity_t parity; /*!< UART parity mode*/
rmt_uart_stop_bits_t stop_bits; /*!< UART stop bits*/
gpio_num_t tx_io_num; /*!< UART TX GPIO num*/
gpio_num_t rx_io_num; /*!< UART RX GPIO num*/
size_t buffer_size; /*!< UART buffer size/*>
} rmt_uart_config_t;
```Mode can be TX only, RX only or both TX and RX.
Buffer size must be 20 times of the length of transmit/receive data.
If you want to send 10 bytes maximum then buffer_size = 200.## Restrictions
Due to hardware limitations ESP32-S2 can only receive 12 bytes at once. In RX only mode this limit is 24 bytes. Transmit has no restriction.