Skip to content

Serial2 initialization on ESP32-WROOM-32E causes reinitialization of digital pin 4 #9728

Closed
@CalamaroGigante

Description

@CalamaroGigante

Board

Firebeetle v1

Device Description

Development board

Hardware Configuration

Serial2 initializing

Version

v3.0.0

IDE Name

Arduino IDE 2.3.2

Operating System

Windows 10

Flash frequency

?

PSRAM enabled

yes

Upload speed

115200

Description

Initializing Serial2 causes IO4 to be set to HIGH, and it is impossible to control via digitalWrite, unless reinitialized
A rollback to previous revision solves the issues

Sketch

#include <Arduino.h>


#define PIN_ENABLE_HOHC 4


void setup() 
{
  pinMode(PIN_ENABLE_HOHC, OUTPUT);// Set as output mode 
  digitalWrite(PIN_ENABLE_HOHC, LOW);   
  Serial.begin(115200);
  Serial.println("First");
  delay(5000);
  Serial2.begin(9600);  //this instruction causes digital pin 4 to go HIGH
  Serial.println("Second");
  delay(5000);
}

void loop() 
{
  pinMode(PIN_ENABLE_HOHC, OUTPUT);//Still high
  digitalWrite(PIN_ENABLE_HOHC, LOW);   
}

Debug Message

Compiles OK, no errors.

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.

Metadata

Metadata

Assignees

Labels

3.0 migrationIssue relates to migration from 2.X to 3.X versionPeripheral: UARTRelated to the UART peripheral or its functionality.Status: SolvedThe issue has been resolved and requires no further action.Type: For referenceCommon questions & problemsType: QuestionOnly question

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions