Skip to content

SoftwareSerial does not work anymore in 4.0.1 #2419

@jaszczurtd

Description

@jaszczurtd

As mentioned in the description, my code works without any issues up to version 3.9.5.
Platform: RP2040-Plus

I also tested whether adding "true" to the object constructor would make a difference, but unfortunately, it didn’t.

I noticed some upcoming changes related to RX/TX inversion (commit ID: 226a318). Perhaps you could take another look at the issue with this change in mind?

Please let me know if you need any further information.

[...]

#define SERIAL_RX_GPIO 22
#define SERIAL_TX_GPIO 21

static SoftwareSerial gpsSerial(SERIAL_RX_GPIO, SERIAL_TX_GPIO); <-- inserting "true" here does not change anything for 4.0.1
static TinyGPSPlus gps;

void serialTalks(void);

static bool isGPSInitialized = false;
void initGPS(void) {
  if(!isGPSInitialized) {
    attachInterrupt(SERIAL_RX_GPIO, serialTalks, FALLING);  
    gpsSerial.begin(9600, SERIAL_7N1);
    isGPSInitialized = true;
  }
}

void serialTalks(void) {
  if(gpsSerial.available() > 0) {
    gps.encode(gpsSerial.read());
  }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions