Skip to content

Unable to Use Serial2 and Serial3 #1855

Closed Answered by fpistm
Shubham916701 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @Shubham916701
You can refer to https://github.com/stm32duino/wiki/wiki/API#hardwareserial

As stated:

By default, only one Serialx instance is available mapped to the generic Serial name.

For BluePill by default Serial instance is mapped to Serial1:

// UART Definitions
#ifndef SERIAL_UART_INSTANCE
#define SERIAL_UART_INSTANCE 1
#endif
// Default pin used for generic 'Serial' instance
// Mandatory for Firmata
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PA10
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PA9

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Shadrack-N
Comment options

Answer selected by fpistm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants