Using UART
Using UART
Hello, i've got a question: where can i set the clock configuration on 115200 or its automatically set? Cause i want to use UART for communication with tfmini plus sensor.
Re: Using UART
It's usual to have something like this, in setup() :
Serial.begin(115200);
- but there's an optional second parameter, called config, which has more options, so you can set things like parity, number of stop bits, and so on, by choosing a configuration off a list of alternatives.
Here's the official arduino reference page, which hopefully also corresponds to how it's done in STM32 arduino:
https://www.arduino.cc/en/Serial.Begin
You can do the same with other serial ports (Serial1, Serial2...), but you may need to declare them first, specifying the pins they use.
If you meant setting which hardware clock or timer is used... I have no idea
I suspect it's automatic, and fixed.
Serial.begin(115200);
- but there's an optional second parameter, called config, which has more options, so you can set things like parity, number of stop bits, and so on, by choosing a configuration off a list of alternatives.
Here's the official arduino reference page, which hopefully also corresponds to how it's done in STM32 arduino:
https://www.arduino.cc/en/Serial.Begin
You can do the same with other serial ports (Serial1, Serial2...), but you may need to declare them first, specifying the pins they use.
If you meant setting which hardware clock or timer is used... I have no idea

Re: Using UART
The config for the Serial speed is made automatically using the method.
Code: Select all
Begin(speed)