I'm using the STM32F070CBT6TR MCU in a custom board and I'm using all of its pins in my project. I'm trying to use Serial3 for debugging just as a test and writing a pin as output, PA6. My code is simple, its just starting USART3 serial and it's working fine, but when I try to digitalWrite PA6, serial just stops working. I read on the datasheet that PA6 has the USART3_CTS configuration, and I don't understend how it stops serial communication. Is there another configuration I need to make to disable that pin as a CTS default pin?
As far as I know, stm32duino libraries does not have support for CTS/RTS, but I wonder if I could disable it anyways.
Here's my simple sketch:
Code: Select all
#include <HardwareSerial.h>
HardwareSerial SerialPort(USART3);
void setup() {
SerialPort.begin(9600);
SerialPort.println("DAE");
pinMode(PA8, INPUT);
pinMode(PA6, OUTPUT);
digitalWrite(PA6, HIGH);
}
void loop() {
SerialPort.println(analogRead(PA8));
}