Description
Hardware:
Board: ESP32-WROVER (both dev kit and ESP-EYE)
Core Installation version: v1.0.4 works fine, v1.0.5 and v1.0.6 have the bug
IDE name: Bug validated in Arduino IDE and Platformio
Flash Frequency: 40Mhz
PSRAM enabled: yes
Upload Speed: 115200
Computer OS: Windows 10, Ubuntu
Describe your problem here
If we boot up our code with the serial RX line busy, the ESP32-Wrover hangs. After some hardware debugging (testing on the ESP-WRrover-kit) the issue seems to be happening in Serial.begin(). More specifically, after uartAttachRx(uart, rxPin, inverted) is called in esp32-hal-uart.c . We didn't have this issue in earlier versions of the IDF (we're using Arduino on platformIO and moved from 3.0.0 to 3.X.0). 3.1-3.3 all seem to have the same problem. We can bodge around it by being careful with the other MCUs the ESP32 is talking to but I'd rather just fix the bug :)
The experiment consists of a teensy printing constantly to the serial bus (10 uS downtime between string packets).
It appears that the RX interrupt is firing continuously preventing other code from executing.
I've tried initializing Serial in void loop (in a run once block) to confirm that we can make it through the rest of setup just fine. Same issue happens.
I can also successfully run: Serial.begin(115200,SERIAL_8N1,-1,1); in void setup() to get serial output just fine. Then end the serial and restart with normal Serial.begin(115200) ;
I'm attaching a screenshot showing the stack where it is stuck at esp_intr_alloc()
Sketch: (leave the backquotes for code formatting)
//Change the code below by your sketch
#include <Arduino.h>
void setup() {
Serial.begin(115200);
}
void loop() {
Serial.println("hello world");
delay(100);
}
Debug Messages:
Enable Core debug level: Debug on tools menu of Arduino IDE, then put the serial output here
It locks up right after PSRAM_enable() prints to the screen