HardwareSerial stm32f103 definition?

Generic boards that are not Maple or Maple mini clones, and don't contain the additional USB reset hardware
Post Reply
41300895
Posts: 28
Joined: Tue Oct 25, 2016 12:19 pm

HardwareSerial stm32f103 definition?

Post by 41300895 » Mon Feb 06, 2017 9:08 am

Hello I want to use HardwareSerial with USART1 pin PB6, PB7 on stm32f103 blue pill board but I don't know how to define it in my code, please show me how

stevestrong
Posts: 1139
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: HardwareSerial stm32f103 definition?

Post by stevestrong » Mon Feb 06, 2017 10:50 am

I would try:

Code: Select all

#include <libmaple/gpio.h>
...
afio_remap(AFIO_REMAP_USART1);

stevestrong
Posts: 1139
Joined: Mon Oct 19, 2015 12:06 am
Location: Munich, Germany

Re: HardwareSerial stm32f103 definition?

Post by stevestrong » Mon Feb 06, 2017 11:01 pm

And, did it work?

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest