-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial1 for genericGD32F130C6 and Arduino not working #44
Comments
Well technically for Arduino blinky to have the same behavior you would have #define LED PB9
void setup(){
pinMode(LED, OUTPUT);
}
void loop() {
digitalWrite(LED, LOW);
delay(500);
digitalWrite(LED, HIGH);
delay(500);
} To reproduce this, I would also need to know which exact board you're compiling for. Please post the exact |
arduino
spl
|
What exact board are you running on? Custom made? Does it have a quartz crystal for HSE? |
NO external quartz crystal |
Hm okay that should still be fine because the Arduino system code configures the clock to be sourced from the internal RC 8MHz oscillator. Can you test this exact code? #44 (comment) If you're uploading via ST-Link, you should also be able to use the Debugging sidebar ("PIO Debug"). Does it get stuck somewhere? |
Your code works, How to config Serial1 pin PA2 as RX, PA3 as TX |
This should already be the default configuration for And the pin mapping looks good too When you go back to your original code and debug it in the debugger, do you see it getting stuck somewhere? |
gpio OK,spl framework uart OK, |
I checked the code again and the macros are named very confusingly indeed. So you actually need to use #include <Arduino.h>
#define LED PB9
void setup(){
pinMode(LED, OUTPUT);
Serial2.begin(57600);
Serial2.println("Start on Serial2!");
}
void loop() {
digitalWrite(LED, LOW);
delay(500);
digitalWrite(LED, HIGH);
delay(50);
Serial2.println("Serial2");
} |
even simple gpio
spl code work well
The text was updated successfully, but these errors were encountered: