Skip to content

RMT: RMTLoopback example hangs and gives core error #11200

Closed
@fanfanlatulipe26

Description

@fanfanlatulipe26

Board

ESP32 Dev Kit v1

Device Description

ESP32 Dev Kit v1

Hardware Configuration

Jumper between pin 18 and 21

Version

v3.1.2

IDE Name

Arduino IDE 1.8.19

Operating System

Windows 10

Flash frequency

80Mhz

PSRAM enabled

no

Upload speed

921600

Description

In fact I use the very last version of ESP32: 3.2.0 (release not yet available in the dropdown list here above)

The standard RMTLoopback example fails with an error and hangs
E (1190) rmt: rmt_receive(386): partial receive not supported
If the example is compiled with debug level None we just get:
real tick set to: 100ns Please connect GPIO 18 to GPIO 21, now. E (11) rmt: rmt_receive(386): partial receive not supported
If we compile with debug level Error, we get more output from the testcase as can be seen in the "Debug Message" section

As can be seen in the output of the test, the results are not exactly the one expexted, but not really garbage. Some shift ??

More: the frequency used in the example is 10 000 000
#define RMT_FREQ 10000000 // tick time is 100ns
In fact the generated waveform shows that it is not 100ns, and the wave form is not exactly the one given by the data array.
I found little documentation and the tick time is not at all always as described in the comment in esp32-hal-rmt.h for rmtInit

New Parameters in Arduino Core 3: RMT tick is set in the rmtInit() function by the frequency of the RMT channel. Example: 100ns tick => 10MHz, thus frequency will be 10,000,000 Hz
Seems OK for 1Mhz, 2Mhz,8Mhz, but bad for 5Mhz, 10Mhz.

Sketch

The example given in for ESP32 RMT: RMTLoopback
No change.

Debug Message

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0030,len:4888
load:0x40078000,len:16516
load:0x40080400,len:4
load:0x40080404,len:3476
entry 0x400805b4
[     1][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x400d489c
[    12][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x400d4880
[    26][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x400d4864
[    39][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x400d4848
[    53][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x400d489c
[    66][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x400d4880
[    80][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x400d4864
[    93][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x400d4848
[   107][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RX (2) successfully set to 0x400d489c
[   120][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_TX (3) successfully set to 0x400d4880
[   133][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_CTS (4) successfully set to 0x400d4864
[   147][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type UART_RTS (5) successfully set to 0x400d4848
[   177][D][esp32-hal-cpu.c:263] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[   193][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 3 successfully set to type UART_RX (2) with bus 0x3ffbdb60
[   204][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 1 successfully set to type UART_TX (3) with bus 0x3ffbdb60
=========== Before Setup Start ===========
Chip Info:
------------------------------------------
  Model             : ESP32
  Package           : D0WD-Q6
  Revision          : 1.00
  Cores             : 2
  CPU Frequency     : 240 MHz
  XTAL Frequency    : 40 MHz
  Features Bitfield : 0x00000032
  Embedded Flash    : No
  Embedded PSRAM    : No
  2.4GHz WiFi       : Yes
  Classic BT        : Yes
  BT Low Energy     : Yes
  IEEE 802.15.4     : No
------------------------------------------
INTERNAL Memory Info:
------------------------------------------
  Total Size        :   372984 B ( 364.2 KB)
  Free Bytes        :   332084 B ( 324.3 KB)
  Allocated Bytes   :    33748 B (  33.0 KB)
  Minimum Free Bytes:   326388 B ( 318.7 KB)
  Largest Free Block:   110580 B ( 108.0 KB)
------------------------------------------
Flash Info:
------------------------------------------
  Chip Size         :  4194304 B (4 MB)
  Block Size        :    65536 B (  64.0 KB)
  Sector Size       :     4096 B (   4.0 KB)
  Page Size         :      256 B (   0.2 KB)
  Bus Speed         : 80 MHz
  Bus Mode          : QIO
------------------------------------------
Partitions Info:
------------------------------------------
                nvs : addr: 0x00009000, size:    20.0 KB, type: DATA, subtype: NVS
            otadata : addr: 0x0000E000, size:     8.0 KB, type: DATA, subtype: OTA
               app0 : addr: 0x00010000, size:  1280.0 KB, type:  APP, subtype: OTA_0
               app1 : addr: 0x00150000, size:  1280.0 KB, type:  APP, subtype: OTA_1
             spiffs : addr: 0x00290000, size:  1408.0 KB, type: DATA, subtype: SPIFFS
           coredump : addr: 0x003F0000, size:    64.0 KB, type: DATA, subtype: COREDUMP
------------------------------------------
Software Info:
------------------------------------------
  Compile Date/Time : Mar 28 2025 17:01:13
  Compile Host OS   : windows
  ESP-IDF Version   : v5.4.1-1-g2f7dcd862a-dirty
  Arduino Version   : 3.2.0
------------------------------------------
Board Info:
------------------------------------------
  Arduino Board     : ESP32_DEV
  Arduino Variant   : esp32
  Arduino FQBN      : esp32:esp32:esp32:JTAGAdapter=default,PSRAM=disabled,PartitionScheme=default,CPUFreq=240,FlashMode=qio,FlashFreq=80,FlashSize=4M,UploadSpeed=921600,LoopCore=1,EventsCore=1,DebugLevel=verbose,EraseFlash=none,ZigbeeMode=default
============ Before Setup End ============
[   714][V][esp32-hal-uart.c:552] uartBegin(): UART0 baud(115200) Mode(800001c) rxPin(3) txPin(1)
[   723][V][esp32-hal-uart.c:650] uartBegin(): UART0 not installed. Starting installation
[   733][V][esp32-hal-uart.c:660] uartBegin(): UART0 RX FIFO full threshold set to 120 (value requested: 120 || FIFO Max = 128)
[   746][V][esp32-hal-uart.c:681] uartBegin(): Setting UART0 to use REF_TICK clock
[   756][V][esp32-hal-uart.c:732] uartBegin(): UART0 initialization done.
[   771][V][esp32-hal-uart.c:783] uartSetRxFIFOFull(): UART0 RX FIFO Full value set to 120 from a requested value of 120
[   782][V][esp32-hal-rmt.c:454] rmtInit(): GPIO 18 - TX MODE - MemSize[64] - Freq=10000000Hz
[   790][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type RMT_TX (13) successfully set to 0x400d1ef8
[   801][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type RMT_RX (14) successfully set to 0x400d1ef8
[   813][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 18 successfully set to type RMT_TX (13) with bus 0x3ffb8e60
[   824][V][esp32-hal-rmt.c:454] rmtInit(): GPIO 21 - RX MODE - MemSize[192] - Freq=10000000Hz
[   832][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type RMT_TX (13) successfully set to 0x400d1ef8
[   844][V][esp32-hal-periman.c:235] perimanSetBusDeinit(): Deinit function for type RMT_RX (14) successfully set to 0x400d1ef8
[   855][V][esp32-hal-periman.c:160] perimanSetPinBus(): Pin 21 successfully set to type RMT_RX (14) with bus 0x3ffb944c
real tick set to: 100ns

Please connect GPIO 18 to GPIO 21, now.
=========== After Setup Start ============
INTERNAL Memory Info:
------------------------------------------
  Total Size        :   372984 B ( 364.2 KB)
  Free Bytes        :   327464 B ( 319.8 KB)
  Allocated Bytes   :    37680 B (  36.8 KB)
  Minimum Free Bytes:   321620 B ( 314.1 KB)
  Largest Free Block:   110580 B ( 108.0 KB)
------------------------------------------
GPIO Info:
------------------------------------------
  GPIO : BUS_TYPE[bus/unit][chan]
  --------------------------------------  
     1 : UART_TX[0]
     3 : UART_RX[0]
    18 : RMT_TX
    21 : RMT_RX
============ After Setup End =============
[   947][V][esp32-hal-rmt.c:377] _rmtRead(): GPIO: 21 - Request: 30 RMT Symbols - Non-Blocking - Timeout: 0
[   957][V][esp32-hal-rmt.c:305] _rmtWrite(): GPIO: 18 - Request: 30 RMT Symbols - Blocking - Timeout: -1
[   966][V][esp32-hal-rmt.c:306] _rmtWrite(): GPIO: 18 - Currently in Loop Mode: [NO] | Asked to Loop: NO, LoopCancel: NO
Got 30 RMT symbols
000d8001=8001000e 000c8002=8002000d 000b8003=8003000c 000a8004=8004000b 
00098005=8005000a 00088006=80060009 00078007=80070008 00068008=80080007 
00058009=80090006 0004800a=800a0005 0003800b=800b0004 0002800c=800c0003 
000e800d=800d0002 000d8001=8001000e 000c8002=8002000d 000b8003=8003000c 
000a8004=8004000b 00098005=8005000a 00088006=80060009 00078007=80070008 
00068008=80080007 00058009=80090006 0004800a=800a0005 0003800b=800b0004 
0002800c=800c0003 000e800d=800d0002 000d8001=8001000e 000c8002=8002000d 
000b8003=8003000c 00008004=8004000b 00000000=8005000a 00000000=80060009 
00000000=80070008 00000000=80080007 00000000=80090006 00000000=800a0005 
00000000=800b0004 00000000=800c0003 00000000=800d0002 00000000=8001000e 
00000000=8002000d 00000000=8003000c 00000000=8004000b 00000000=8005000a 
00000000=80060009 00000000=80070008 00000000=80080007 00000000=80090006 
00000000=800a0005 00000000=800b0004 00000000=800c0003 00000000=800d0002 
00000000=8001000e 00000000=8002000d 00000000=8003000c 00000000=8004000b 
00000000=8005000a 00000000=80060009 00000000=80070008 00000000=80080007 


[  1570][V][esp32-hal-rmt.c:377] _rmtRead(): GPIO: 21 - Request: 30 RMT Symbols - Non-Blocking - Timeout: 0
E (1403) rmt: rmt_receive(386): partial receive not supported
[  1580][V][esp32-hal-rmt.c:305] _rmtWrite(): GPIO: 18 - Request: 30 RMT Symbols - Blocking - Timeout: -1
[  1594][V][esp32-hal-rmt.c:306] _rmtWrite(): GPIO: 18 - Currently in Loop Mode: [NO] | Asked to Loop: NO, LoopCancel: NO

Other Steps to Reproduce

I tried with other GPIOs. Same results

I have checked existing issues, online documentation and the Troubleshooting Guide

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.

Metadata

Metadata

Assignees

Type

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions