Unable to Use Serial2 and Serial3 #1855
-
Hello, I have been using the Arduino IDE for programming controllers from Atmel, esp, and teensy. I have an application for which I will need to use the 3 Hardware Serial Ports of the Bluepill. The Board selection is shown below. When I use Serial.begin(9600) or Serial1.begin(9600), the code gets compiled without any errors. The error occurs when i try to use Serial2. Looking forward to a Saviour. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @Shubham916701 As stated:
For BluePill by default To use Anyway STM32F103C6 has only 2 USART not 3. Maybe you got a BluePill F103C8? |
Beta Was this translation helpful? Give feedback.
Hi @Shubham916701
You can refer to https://github.com/stm32duino/wiki/wiki/API#hardwareserial
As stated:
For BluePill by default
Serial
instance is mapped toSerial1
:Arduino_Core_STM32/variants/STM32F1xx/F103C4T_F103C6(T-U)/variant_BLUEPILL_F103C6.h
Lines 125 to 137 in 4e9dae5