Serial port not working on STM32 bluepill

I’m trying to connect to the serial port on PA9 and PA10 of an stm32f103c8t6. I did:

cd riot/examples/hello-world
BOARD=bluepill make

I uploaded the bin file, but nothing appeared on my serial port at either 115200 or 9600 baud. How do I fix this?

Hello Blippy,

for the BluePill the printf statements go the the STDIO at UART_DEV(1) which resides at pins A3 and A2.

That should get the example going I hope.

Gr,

John

Thanks! We have liftoff!

How did you know those were the pins to use, BTW? I did some grepping around, but couldn’t find anything that seemed relevant. If it weren’t for you, I would have been stuck.

I’m glad I got that sorted. It has emboldened me to see if I can migrate a separate Arduino Uno project I have over to RIOT.

Hello blippy,

your welcome.

Part 1. If you use google you will find a pinout diagram for the BluePill. Part 2. All the used targets for RIOT-OS have to endup linking to resources that are physically present on the chip.

This is defined for every possible board.

So for BluePill this is: …/RIOT/boards/common/blxxxpill/include There you will find the actual used device. In board_common.h you will see that the STDIO output is assiged for UART 2 - resources start counting from 0 - on the Bluepill. The pinout diagram tells you which physical pins.

Keep this location in mind if you plan to use more of the Bluepill internal devices!

John