[solved] STM32L476RG Serial Messup
Posted: Sun Dec 20, 2020 5:28 pm
i just got a new nucleo-64 STM32L476RG. im trying to control multiple Serial slaves via the multiple uart ports on the nucleo.
the problem its most of the serial ports are printing through the USB adapter. only uart3 its printing over its respective pin. uart4 its not printing at all.
here its my code
this its coming in the serial monitor:
the problem its most of the serial ports are printing through the USB adapter. only uart3 its printing over its respective pin. uart4 its not printing at all.
here its my code
Code: Select all
HardwareSerial Serial3(USART3);
HardwareSerial Serial1(USART1);
HardwareSerial Serial4(UART4);
//HardwareSerial Serial4(PA_1,PA_0);
//HardwareSerial Serial5(UART5,PC_12,PD_2);
HardwareSerial Serial5(UART5);
//HardwareSerial Serial5(PC_12,PD_2);
//HardwareSerial Serial5(PD_2,PC_12);
void setup() {
Serial5.begin(9600);Serial5.println("");Serial.println("serial 5");
Serial4.begin(9600);Serial4.println("serial 4");
Serial3.begin(9600);Serial3.println("serial 3");
Serial2.begin(9600);Serial2.println("serial 2");
Serial1.begin(9600);Serial1.println("serial 1");
Serial.begin(9600);Serial.println("serial 0");Serial.println("*****");
please help me get this serials to work and thanks.12:26:13.036 -> serial 5
12:26:13.036 -> serial 2
12:26:13.069 -> serial 0
12:26:13.069 -> *****