how to use multiple serial ports in stm32f103

Post here first, or if you can't find a relevant section!
Post Reply
Samba
Posts: 1
Joined: Fri Jul 31, 2020 3:55 pm

how to use multiple serial ports in stm32f103

Post by Samba »

i had a sensor with uart port and i need to communicate with that sensor with stm 32 but when it was not happening

GonzoG
Posts: 27
Joined: Wed Jan 15, 2020 11:30 am
Answers: 2

Re: how to use multiple serial ports in stm32f103

Post by GonzoG »

More information would be nice...
What core, port, speed, sensor...

And to your main question:
https://github.com/stm32duino/wiki/wiki ... wareserial

mrburnette
Posts: 187
Joined: Thu Dec 19, 2019 1:23 am

Re: how to use multiple serial ports in stm32f103

Post by mrburnette »

also:
https://stm32duinoforum.com/forum/wiki_ ... USB_Serial
Serial & USB Serial
Serial USB is enabled for all F103 boards when uploading using the bootloader, it is also available when uploading by ST-Link (SWD) In these cases:

- Serial.print("Hello world"); will print via Serial USB (CDC).
- Serial1 prints to hardware USART 1
- Serial2 prints to hardware USART 2
- etc
When uploading via "Serial" (external USB to Serial adaptor connected to PA9 and PA10 (USART1) on the STM32):

- Serial.print("Hello world"); will print to hardware USART1 (the one the code was uploaded using)
- Serial1 prints to hardware USART 2
- etc
Note. Some boards, e.g. Nucleo F103RB have special serial mapping, because these boards need to have hardware modification to make Serial usable.

The Serial <-> USART mapping is defined in file "variants//board.cpp".

GonzoG
Posts: 27
Joined: Wed Jan 15, 2020 11:30 am
Answers: 2

Re: how to use multiple serial ports in stm32f103

Post by GonzoG »

Yes, but that's Roger Clarck's core.

User avatar
fpiSTM
Posts: 660
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 25
Location: Le Mans
Contact:

Re: how to use multiple serial ports in stm32f103

Post by fpiSTM »

Hi @Samba
Could you tell us which core you used ?
Else we will not be able to help.

Post Reply

Return to “General discussion”