RMT pins, how do I know which ones?

darkgiuseppe
Posts: 26
Joined: Fri Mar 11, 2022 3:57 pm

RMT pins, how do I know which ones?

Postby darkgiuseppe » Fri Mar 11, 2022 4:02 pm

Hello,

Getting to know the ESP32-S3 better (it's my first ESP32 chip I have ever played with) and getting used to everything. This might sound like a silly question but how do I know which pins are for which RMT channel? I know I can see the constants in my IDE such as RMT_CHANNEL_0 but I am not sure when physical pin it is on the ESP32-S3-DevkitC board. I have seen labeled pins online but I do not see anything labelled as RMT so far.

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: RMT pins, how do I know which ones?

Postby Sprite » Sat Mar 12, 2022 2:44 am

Generally, most peripherals on the ESP32 series do not have dedicated pins. The chip has a GPIO matrix, which means you can effectively route any function to any GPIO pin. Even the pins that *are* indicated, tend to simply be the defaults. (Note that there are exceptions, e.g. SDIO and ADC, which do have dedicated pins, but these peripherals are a minority.)

darkgiuseppe
Posts: 26
Joined: Fri Mar 11, 2022 3:57 pm

Re: RMT pins, how do I know which ones?

Postby darkgiuseppe » Sat Mar 12, 2022 8:05 pm

Oh interesting. How do I find out the defaults for the RMT pins? I think I only want to use the GPIO matrix feature if I am stuck in a corner for rework.

Sprite
Espressif staff
Espressif staff
Posts: 10617
Joined: Thu Nov 26, 2015 4:08 am

Re: RMT pins, how do I know which ones?

Postby Sprite » Sat Mar 12, 2022 11:52 pm

There are no defaults and there is no way to route RMT that doesn't involve the GPIO matrix. It's generally not a complicated thing, though: if you use ESP-IDF, for instance, you simply tell the RMT driver which pin to use as a parameter in the initialization call.

darkgiuseppe
Posts: 26
Joined: Fri Mar 11, 2022 3:57 pm

Re: RMT pins, how do I know which ones?

Postby darkgiuseppe » Tue Mar 15, 2022 9:08 pm

O.o it's like magic lol

Okay thank you for this information.

Jeevan
Posts: 3
Joined: Thu Mar 17, 2022 4:58 pm

Re: RMT pins, how do I know which ones?

Postby Jeevan » Thu Mar 17, 2022 5:41 pm

Does it matter which channel we choose?
Also, I tried configuring the gpio through menuconfig but can't seem to navigate it well.
The purpose was to replicate the blink example sketch when they defined CONFIG_GPIO_LED and it was in the sdkconfig.h file with CONFIG_GPIO_LED set to 48(esp32s3).
So I was thinking setting the gpio through menuconfig would produce the same results in my sdkconfig.h file.
Is this right?

FrankJensen
Posts: 72
Joined: Sun Mar 10, 2024 9:34 pm

Re: RMT pins, how do I know which ones?

Postby FrankJensen » Thu Apr 17, 2025 11:58 pm

Hi there..

I use the RMT module in S3. There are 4 output channels, but I need 8.
I know, that I can delete the RMT channel and create a new with a different GPIO.

But what I really want to do, is just reconfigure the GPIO and start the transmission again. Fast and clean (hopefully).

I have tried gpio_hal_route_output_signal and gpio_matrix_out, but they both seem to belong to an older version of ESPIDF.

How do I re-route RMT output via the matrix, in the current ESPIDF?

I found some creative solutions online, but are they valid? and safe? eg

Code: Select all

#include "soc/io_mux_reg.h"
#include "soc/gpio_sig_map.h"
#include "soc/gpio_periph.h"
#include "soc/soc.h"

#define GPIO_FUNCx_OUT_SEL_CFG_REG(gpio_num) (DR_REG_GPIO_BASE + 0x530 + ((gpio_num) * 4))

void rmt_remap_gpio(gpio_num_t gpio, int rmt_sig) {
    // Route the RMT output signal to the specified GPIO
    REG_WRITE(GPIO_FUNCx_OUT_SEL_CFG_REG(gpio),
              (rmt_sig & 0x3F)         // output signal index
              | (0 << 8)               // not inverted
              | (1 << 9));             // enable output
}

FrankJensen
Posts: 72
Joined: Sun Mar 10, 2024 9:34 pm

Re: RMT pins, how do I know which ones?

Postby FrankJensen » Fri Apr 18, 2025 12:21 am

Ah....
is it

Code: Select all

gpio_iomux_out(GPIO_NUM_8, RMT_SIG_OUT0_IDX, false);

Who is online

Users browsing this forum: Amazon [Bot], Perplexity-User, PetalBot and 3 guests