Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0.0 Alpha2 :: Serial + RMT doesn't work. #8809

Closed
1 task done
SuGlider opened this issue Oct 25, 2023 · 3 comments · Fixed by #8820
Closed
1 task done

3.0.0 Alpha2 :: Serial + RMT doesn't work. #8809

SuGlider opened this issue Oct 25, 2023 · 3 comments · Fixed by #8820
Assignees
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Status: Review needed Issue or PR is awaiting review Type: Bug 🐛 All bugs
Milestone

Comments

@SuGlider
Copy link
Collaborator

Board

ESP32

Device Description

DevKit

Hardware Configuration

None

Version

latest master (checkout manually)

IDE Name

Arduino IDE

Operating System

Win11

Flash frequency

80Mhz

PSRAM enabled

no

Upload speed

115200

Description

Starting UART0 and then using RX/TX Pins for RMT and starting again UART0 fails.
It works with 2.0.14, but it doesn't with 3.0.0-Alpha2.

The execution sequence can be seen in the example bellow.

Sketch

void setup() {
  Serial.begin(115200);
  delay(1000);
  Serial.println("TESTING ... 1");
  Serial.flush();

  const uint8_t testedPin = 1; // ESP32 UART0 RX=3 | TX = 1
#if 0
  // Arduino Core 2.0.4 -- working fine.
  rmt_obj_t* rmt_send = NULL;
  if ((rmt_send = rmtInit(testedPin, RMT_TX_MODE, RMT_MEM_64)) == NULL) {
    Serial.println("init sender failed\n"); // RX(3) / TX(1) is being used now... it may not print anything.
  }
  float realTick = rmtSetTick(rmt_send, 100);
  Serial.printf("real tick set to: %fns\n", realTick); // not to be seen... as we use TX0 in RMT.
#else
  // Arduino Core 3.0.0-Alpha2 -- working fine.
  if (!rmtInit(testedPin, RMT_TX_MODE, RMT_MEM_NUM_BLOCKS_1, 10000000)) {
    Serial.println("init sender failed\n");
  }
  Serial.println("real tick set to: 100ns");
#endif
  delay(500);
  Serial.end();
  Serial.begin(115200);
  Serial.setPins(3, 1);
  Serial.println("TESTING ... 2");
  Serial.flush();
}

void loop() {
  Serial.println("Looping ...");
  delay(5000);
}

Debug Message

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:1416
load:0x40078000,len:14804
load:0x40080400,len:4
load:0x40080404,len:3356
entry 0x4008059c
TESTING ... 1
********************===> UART0 stops working and it doesn't recover

Other Steps to Reproduce

None.

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@SuGlider SuGlider added Status: Awaiting triage Issue is waiting for triage Type: Bug 🐛 All bugs and removed Status: Awaiting triage Issue is waiting for triage labels Oct 25, 2023
@SuGlider SuGlider self-assigned this Oct 25, 2023
@SuGlider SuGlider added this to the 3.0.0 milestone Oct 25, 2023
@lucasssvaz lucasssvaz added the 3.0 migration issue relates to migration from 2.X to 3.X version label Oct 25, 2023
@SuGlider
Copy link
Collaborator Author

Expected Ouput (obtained with 2.0.14):

ets Jul 29 2019 12:21:46

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:1344
load:0x40078000,len:13964
load:0x40080400,len:3600
entry 0x400805f0
TESTING ... 1
TESTING ... 2
Looping ...
Looping ...
Looping ...

@lucasssvaz
Copy link
Collaborator

lucasssvaz commented Oct 26, 2023

Update:
Same thing happens with SPI in some cases. Still not sure why.

@SuGlider
Copy link
Collaborator Author

Update: Same thing happens with SPI in some cases. Still not sure why.

This shall be fully fixed by #8820
@lucasssvaz - please let me know about your CI testing.

@SuGlider SuGlider moved this from Under investigation to In Review in Arduino ESP32 Core Project Roadmap Oct 31, 2023
@VojtechBartoska VojtechBartoska added Status: Review needed Issue or PR is awaiting review and removed Status: In Progress Issue is in progress labels Nov 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0 migration issue relates to migration from 2.X to 3.X version Status: Review needed Issue or PR is awaiting review Type: Bug 🐛 All bugs
Projects
Development

Successfully merging a pull request may close this issue.

3 participants