Table of Contents

Class RmtChannelSettings

Namespace
nanoFramework.Hardware.Esp32.Rmt
Assembly
nanoFramework.Hardware.Esp32.Rmt.dll

Base class for shared RMT Channel settings.

public abstract class RmtChannelSettings
Inheritance
RmtChannelSettings
Derived
Inherited Members
Extension Methods

Constructors

RmtChannelSettings(int)

Initializes a new instance of the RmtChannelSettings class.

protected RmtChannelSettings(int pinNumber)

Parameters

pinNumber int

The GPIO Pin number to use with the channel.

Properties

NumberOfMemoryBlocks

Gets or sets the number of memory blocks available to the current channel.

public byte NumberOfMemoryBlocks { get; set; }

Property Value

byte

Remarks

This function is used to configure the number of memory blocks allocated to a channel. The size of the memory block depends on the target ESP32 and is normally 64x32-bit or 48x32-bit, and the maximum number of blocks that can be allocated is the number of channels available on target.

List of memory block sizes for various ESP32 targets:

  • ESP32: 8 Channels of 64x32-bit = 512x32-bit RAM block total
  • ESP32_S2: 8 Channels of 64x32-bit = 512x32-bit RAM
  • ESP32_S3: 8 Channels of 64x32-bit = 512x32-bit RAM
  • ESP32_C3: 4 Channels of 48x32-bit = 192x32-bit RAM
  • ESP32_C5: 4 Channels of 48x32-bit = 192x32-bit RAM
  • ESP32_C6: 4 Channels of 48x32-bit = 192x32-bit RAM
  • ESP32_P4: 8 Channels of 48x32-bit = 384x32-bit RAM
  • ESP32_H2: 4 Channels of 48x32-bit = 192x32-bit RAM

This means that every channel gets a single memory block equaling 64x32-bit or 48x32-bit. If the number of memory blocks of one channel is set to a value greater than 1, this channel will occupy the memory block of the next channel. The first Channel can use at most 8/4 blocks of memory, accordingly last channel can only use one memory block.

PinNumber

Gets or sets the GPIO pin number to be used with the specified channel.

public int PinNumber { get; set; }

Property Value

int

Exceptions

ArgumentOutOfRangeException

Value cannot be less than 0.

ResolutionHz

Gets or sets the Resolution in Hertz.

public int ResolutionHz { get; set; }

Property Value

int

Remarks

The default value for resolution is 1Mhz = 1us ticks.

Exceptions

ArgumentOutOfRangeException

Value cannot be less than 1.

SignalInverterEnabled

Gets or sets a value indicating if the RMT module should invert the incoming/outgoing signal.

public bool SignalInverterEnabled { get; set; }

Property Value

bool

Remarks

This works like an external inverter connected to the GPIO of certain RMT channel. For RX channels this inverts the input signal and TX channels it inverts the output signal.