hi, I'm new to STM32duino. Yesterday I try to access Serial2 in STM32F103C8T6 and fail. I only can access Serial1 in PA9 and PA10. anyone can help? Here is my code
Code: Select all
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial2.begin(9600);
Serial3.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println ("Serial : hello");
Serial2.println("Serial1: world");
Serial3.println("Serial2: Hello world");
delay(1000);
}
by fathan95 » Tue Aug 22, 2023 1:44 am
I using core from rogerclarkmelborne before, and I try another core in this link
https://github.com/stm32duino/Arduino_Core_STM32
And after that i found article about HardwareSerial in this link
https://github.com/stm32duino/Arduino_C ... 2/wiki/API
This is my code
Code: Select all
HardwareSerial Serial2(PA3,PA2);
HardwareSerial Serial3(PB11,PB10);
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
Serial2.begin(9600);
Serial3.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
Serial.println ("Serial : HELL000");
Serial2.println("Serial2: Hell");
Serial3.println("Serial3: Lo !");
delay(1000);
}
And it's done! Thank you for your help!

Go to full post