HI all - no code here because I don't think it's the code. Please tell me if I'm possibly wrong about that.
I am using a Teensy 4.1 with a Ublox GPS on Serial1 and an external Ebyte LORA transceiver via a UART to RS485 converter that's on Serial5.
Serial1 is at 115200 and Serial 5 is at 19200.
The main loop keeps NeoGPS fed thusly
and occasionally (as a result of an input being detected) the unit fires out a 28 byte packet to the RS485 port for the LORA to transmit.
This all works. The remote end gets the packet and parses it and all is good.. BUT...
The moment the LORA unit transmits, the GPS time stops updating. If I fully re-init Serial1 (via a keypress) then it recovers, and most damningly, if I physically move the LORA box and the GPS unit physically as far away from each other as their current leads allow (30cm), then the GPS time DOES NOT FAIL and carries on just fine. The moment I move them back close together and resend another LORA packet, the GPS time stops updating again.
So from that, I am inferring that this is not a silly code or serial buffer problem, and is in fact some serious interference from the LORA that disrupts either the GPS or the Serial1 badly enough that it loses sync(?) dies in another interesting way. I have also removed power from the LORA box (but left the RS485 converter in place) and this also results in no bad behaviour.
It's not feasible to physically separate the LORA box and GPS unit as they do need to live in the same enclosure so I am looking for workaround inspiration. At the moment my idea is to close the Serial1 for GPS before sending a LORA packet and then opening it again after - but I was wondering if there's something clever I haven't thought of yet...

Any advice / inspiration gratefully considered!
Cheers - Neil G
I am using a Teensy 4.1 with a Ublox GPS on Serial1 and an external Ebyte LORA transceiver via a UART to RS485 converter that's on Serial5.
Serial1 is at 115200 and Serial 5 is at 19200.
The main loop keeps NeoGPS fed thusly
Code:
if (gps.available( gpsPort )) {
while (gps.available( gpsPort )) {
fix = gps.read();
}
}
and occasionally (as a result of an input being detected) the unit fires out a 28 byte packet to the RS485 port for the LORA to transmit.
This all works. The remote end gets the packet and parses it and all is good.. BUT...
The moment the LORA unit transmits, the GPS time stops updating. If I fully re-init Serial1 (via a keypress) then it recovers, and most damningly, if I physically move the LORA box and the GPS unit physically as far away from each other as their current leads allow (30cm), then the GPS time DOES NOT FAIL and carries on just fine. The moment I move them back close together and resend another LORA packet, the GPS time stops updating again.
So from that, I am inferring that this is not a silly code or serial buffer problem, and is in fact some serious interference from the LORA that disrupts either the GPS or the Serial1 badly enough that it loses sync(?) dies in another interesting way. I have also removed power from the LORA box (but left the RS485 converter in place) and this also results in no bad behaviour.
It's not feasible to physically separate the LORA box and GPS unit as they do need to live in the same enclosure so I am looking for workaround inspiration. At the moment my idea is to close the Serial1 for GPS before sending a LORA packet and then opening it again after - but I was wondering if there's something clever I haven't thought of yet...

Any advice / inspiration gratefully considered!
Cheers - Neil G