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

UART: Serial2 wont work on Arduino Core v2.0.15 #9500

Closed
1 task done
khryssmar opened this issue Apr 13, 2024 · 13 comments · Fixed by #9502
Closed
1 task done

UART: Serial2 wont work on Arduino Core v2.0.15 #9500

khryssmar opened this issue Apr 13, 2024 · 13 comments · Fixed by #9502

Comments

@khryssmar
Copy link

Board

ESP32-WROOM-32D

Device Description

Breadboard.

Hardware Configuration

IO17 and IO16 to GPS.

Version

latest master (checkout manually)

IDE Name

Arduino

Operating System

Windows 10

Flash frequency

80Mhz

PSRAM enabled

yes

Upload speed

921600

Description

I am using Serial2 to connect to UBX Neo6m. After 2.0.15, it doesnt work anymore.

Sketch

Serial passthrough

Debug Message

NA

Other Steps to Reproduce

No response

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

  • I confirm I have checked existing issues, online documentation and Troubleshooting guide.
@khryssmar khryssmar added the Status: Awaiting triage Issue is waiting for triage label Apr 13, 2024
@SuGlider
Copy link
Collaborator

SuGlider commented Apr 13, 2024

@khryssmar - please provide more information and a simple sketch that can be used to reproduce the issue.

Thanks in advance.

@SuGlider
Copy link
Collaborator

A quick test reports that Serial2 is using pins 4 and 25 by default... I'll investigate it.

ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_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
[     4][D][esp32-hal-cpu.c:244] setCpuFrequencyMhz(): PLL: 480 / 2 = 240 Mhz, APB: 80000000 Hz
[    37][V][esp32-hal-uart.c:330] uartBegin(): UART2 baud(115200) Mode(800001c) rxPin(4) txPin(25)
[    46][V][esp32-hal-uart.c:416] uartBegin(): UART2 not installed. Starting installation
[    56][V][esp32-hal-uart.c:463] uartBegin(): UART2 initialization done.

@SuGlider
Copy link
Collaborator

Yes... it was the PR #8800 from 3.0.0 that has been imported into 2.015 by #9176

This breaks the UART pins...

Name ESP32 S2 S3 C3
UART0 RX SOC_RX0 3 44 44 20
UART0 TX SOC_TX0 1 43 43 21
UART1 RX RX1 9 -> 26 18 -> 4 15 18
UART1 TX TX1 10 -> 27 17 -> 5 16 19
UART2 RX RX2 16 -> 4 -- 19 --
UART2 TX TX2 17 -> 25 -- 20 --

@SuGlider SuGlider added Breaking change 🔥 and removed Status: Awaiting triage Issue is waiting for triage labels Apr 13, 2024
@SuGlider
Copy link
Collaborator

SuGlider commented Apr 13, 2024

@khryssmar - a quick workaround would be to initialize Serial2 passing the pins, for example:
Serial2.being(115200, SERIAL_8N1, 16, 17); // baud rate, mode, RxPin, TxPin

@lbernstone
Copy link
Contributor

The Serial2 pins were changed because psram is typically on 16 & 17. With a WROOM module, they are available.

@SuGlider
Copy link
Collaborator

It was changed for 3.0.0 as a breaking change.
But for 2.0.x it should reamain the same, not breaking previous sketches.

@VojtechBartoska VojtechBartoska added this to the 2.0.16 milestone Apr 15, 2024
@VojtechBartoska VojtechBartoska moved this from In Review to Done in Arduino ESP32 Core Project Roadmap Apr 15, 2024
@VojtechBartoska VojtechBartoska changed the title Serial2 wont work. UART: Serial2 wont work on Arduino Core v2.0.15 Apr 15, 2024
@VojtechBartoska VojtechBartoska pinned this issue Apr 15, 2024
@VojtechBartoska
Copy link
Contributor

VojtechBartoska commented Apr 15, 2024

Issue is solved, will be included in release 2.0.16, which we will release in approximately one week. We will wait for a while to test and possibly catch other issues.

Thanks @khryssmar for quick response and pointing out this problem!

@sblendorio
Copy link

I'm experiencing the same problem, as I installed 2.0.15 version. How can I take the 2.0.16? The IDE shows 2.0.15 as latest version:

image

@VojtechBartoska
Copy link
Contributor

Hello,

2.0.16 is not released yet, we are still working on it. We will release it in 1 - 2 weeks.

@sblendorio
Copy link

@VojtechBartoska thanks.

I read that 3.0 will have a breaking change. Where do I find the corresponding code for using Serial2?

Thanks again!

@lucasssvaz lucasssvaz unpinned this issue May 2, 2024
@khryssmar
Copy link
Author

khryssmar commented Aug 12, 2024

I would like to reopen the issue. Encountered this again. Please fix. @SuGlider

image
image

@SuGlider
Copy link
Collaborator

@VojtechBartoska thanks.

I read that 3.0 will have a breaking change. Where do I find the corresponding code for using Serial2?

Thanks again!

https://docs.espressif.com/projects/arduino-esp32/en/latest/migration_guides/2.x_to_3.0.html#id14

@SuGlider
Copy link
Collaborator

I would like to reopen the issue. Encountered this again. Please fix. @SuGlider

image image

This change is valid for Arduino Core 3.x.x
Explanation in #10152 (comment)

Arduino Core 2.0.15, 2.0.16 and 2.0.17 had a mistake using new pins.
Arduino Core 2.0.14 and lower use the original pins.

Arduino Core from release/v2.x branch uses the same pins as before:
Fixed with #9502

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

5 participants