Code: Select all
HardwareSerial Serial3(PB11, PB10); /// USART3 works
uint64_t millis_duration = 100, millis_begin;
void setup() {
Serial.begin(115200); // USB
Serial3.begin(19200);
}
void loop() {
if (millis() - millis_begin >= millis_duration) { // debug uart
millis_begin += millis_duration;
Serial3.write("UUU"); // PB10
}
}
Code: Select all
uint64_t millis_duration = 100, millis_begin;
void setup() {
Serial.begin(115200);
SerialLP1.begin(19200);
}
void loop() {
if (millis() - millis_begin >= millis_duration) { // debug uart
millis_begin += millis_duration;
SerialLP1.write("UUU"); // PB11
Serial.println(RCC->CCIPR, BIN); /// debug
}
}
if I try to clear the LPUART1SEL[1] bit manually , it won't work , and in addition , USART3 gets a false clock
so not the right way : please which is the working one ?