hi,
i uploaded the below program which eventhough successfully uploaded to my stm32f103c8 but i am not getting any data in the other port and both the data is displayed on a single port.The only port working is pa9,pa10.none of the other serial ports are working.plz do help me as soon as possible.
Once you begin() USB serial you will get /dev/ttyACM0 port in Linux (sorry im using only Linux)
So everything you are sending to Serial.print() you can catch in USB port. Thats very useful for debug.
@vbondarenko
You're the one that's actually wrong here. Serial interface (or port) in this context refers to UART port.
USB and UART are different protocols. Get that into your skull.
PA11 and PA12 are for USB comm, not UART.
Using PlatformIO with an Arduino framework instead of the actual Arduino IDE, I found that HardwareSerial was needed. The blavery code above worked, and the kaveco code (1) would not compile until I removed references to Serial2 and (2) produced both the Serial and Serial1 outputs on both on PA9 (aka TX1).
I have not tried this using the actual Arduino IDE, but I suspect that that may be the difference.
dammy999: @vbondarenko
You're the one that's actually wrong here. Serial interface (or port) in this context refers to UART port.
USB and UART are different protocols. Get that into your skull.
PA11 and PA12 are for USB comm, not UART.
Yes, but it becomes a Serial port if it is configured as a VCP (virtual comm port) on the USB. You have to remember to select it in Tools when you upload a sketch.