6 years, 10 months ago.

Bug when using both SUART3 and SUART5

Hello, I have a program that uses two port series, the SUAR3 is used to communicate with an LCD and the UART5 to communicate with a GPS receiver. When I use SU in separate programs it works, but when I use both the UART5 remains blocked. I also tried on the UART 1, same observation.

Example:

<code>

  1. include "ViewController.h"
  2. include "LocalisationController.h"

ViewController use Serial(PC_10, PC_11, 9600) Based on uLCD220RD Library ViewController lcd;

ViewController use Serial(PC_12, PD_2, 9600) Based on Adrafruit GPS Library LocalisationController gps;

void gpsEchoLoopback(){

char c;

while(1){ Call serial getc(); c = gps.read(); if(c){printf("%c",c);} }

}

int main(){

lcd.setup(); gps.setup();

Thread gps_th; gps_th.start(callback(&gpsEchoLoopback));

while(1){ lcd.echo("Running ..."); }

} </code>

Thank you

Be the first to answer this question.