Skip to content

esp32c3 Serial1 hardwired to pin 18/19 (USB Pins) #8469

@mcenderdragon

Description

@mcenderdragon

Board

ESP32-c3-WROOM

Device Description

plain module, on selfmade PCB.

Hardware Configuration

gpio18 & 19 are connected to usb, gpio10 is for RX1

Version

v2.0.4

IDE Name

PlatfromIO

Operating System

Win 10

Flash frequency

N/A

PSRAM enabled

yes

Upload speed

115200

Description

https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/HardwareSerial.cpp#L55

https://github.com/espressif/arduino-esp32/blob/master/cores/esp32/HardwareSerial.cpp#L355

Passed arguments are ignored and the defied RX1 and TX1 pins are sued instead.

only workoutaround is to define RX1 and TX1 before including the hardware serial, which si bad design.

Sketch

SerialGPS.begin(9600, SERIAL_8N1, 10, 0);

Debug Message

11:50:01.330 > ESP-ROM:esp32c3-api1-20210207
11:50:01.376 > Build:Feb  7 2021
11:50:01.381 > rst:0x1 (POWERON),boot:0x9 (SPI_FAST_FLASH_BOOT)
11:50:01.381 > SPIWP:0xee
11:50:01.381 > mode:DIO, clock div:1
11:50:01.381 > load:0x3fcd6100,len:0x438
11:50:01.381 > load:0x403ce000,len:0x918
11:50:01.381 > load:0x403d0000,len:0x24e4
11:50:01.381 > SHA-256 comparison failed:
11:50:01.381 > Calculated: 080c5cb68a075ced55f248b97bca965e3e5bd5da80a64e34e6a1638f89d6f64e
11:50:01.381 > Expected: ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff  
11:50:01.381 > Attempting to boot anyway...
11:50:01.381 > entry 0x403ce000

Other Steps to Reproduce

just read the code, the flaw is obvious, no need to provide example code.

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

Labels

Peripheral: UARTRelated to the UART peripheral or its functionality.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions