serialEvent not called (Esp32-S2 Reverse TFT)

Please tell us which board you are using.
For CircuitPython issues, ask in the Adafruit CircuitPython forum.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
avsteele
 
Posts: 7
Joined: Thu Sep 01, 2022 4:46 pm

serialEvent not called (Esp32-S2 Reverse TFT)

Post by avsteele »

serialEvent() does not appear to run on this board when data is received. Other serial operations seem to be OK.

I am not an expert on this but I think it should be called as long as there isn't something wrong with the hardware pins (Rx0=44, Tx0=43). Are these tied to something odd for this board?

Relevant code is below:
https://github.com/espressif/arduino-es ... Serial.cpp

I haven't had trouble with serialEvent on other boards, e.g. the Esp32 V2 feather.

The simple sketch to check this:

Code: Select all

int incomingByte = 0; // for incoming serial data

void setup() {
  Serial.begin(115200); // opens serial port, sets data rate to 9600 bps
}

bool gotEvent = false;
bool gotEvent1 = false;
bool gotEvent2 = false;

void loop() {
  if (Serial.available() > 0) {
    // read the incoming byte:
    incomingByte = Serial.read();

    // say what you got:
    Serial.print("I received: ");
    Serial.println(incomingByte, DEC);
  }
  if(gotEvent || gotEvent1 || gotEvent2)
  {
    Serial.println("event");
    gotEvent= false;
    gotEvent1= false;
    gotEvent2= false;
  }
}

void serialEvent() {
  gotEvent = true;  
}

void serialEvent1() {
  gotEvent1 = true;  
}

void serialEvent2() {
  gotEvent2 = true;  
}

User avatar
mikeysklar
 
Posts: 14181
Joined: Mon Aug 01, 2016 8:10 pm

Re: serialEvent not called (Esp32-S2 Reverse TFT)

Post by mikeysklar »

There serial port pins look different in the Eagle schematic off the Downloads page than the ones noted in the ESP IDF definitions.
Screenshot from 2023-04-01 11-04-25.png
Screenshot from 2023-04-01 11-04-25.png (131.22 KiB) Viewed 20 times

User avatar
avsteele
 
Posts: 7
Joined: Thu Sep 01, 2022 4:46 pm

Re: serialEvent not called (Esp32-S2 Reverse TFT)

Post by avsteele »

Hmm, thanks. Not sure I fully follow how this all goes together. Can something be changed in the library files to fix this?

Locked
Please be positive and constructive with your questions and comments.

Return to “Feather - Adafruit's lightweight platform”