why i need SetRx/SetTx before use Serial?
Posted: Sat Jul 30, 2022 9:45 pm
i don't know if this question already answered, but.
when i try to doing serial communication(STM32F407VGTx) in default Serial instance i need to set
even i already change default pin on variant_generic.h (i use generic board), and i have use --board-options on arduino-cli
before add setRx/Tx serial communication not working, and after add setRx/Tx serial working as expected
it is normal way to use Serial instance?
thanks for any help
when i try to doing serial communication(STM32F407VGTx) in default Serial instance i need to set
Code: Select all
Serial.setRx(PA10);
Serial.setTx(PA9);
Code: Select all
#ifndef PIN_SERIAL_RX
#define PIN_SERIAL_RX PA10
#endif
#ifndef PIN_SERIAL_TX
#define PIN_SERIAL_TX PA9
#endif
Code: Select all
arduino-cli compile -b STMicroelectronics:stm32:GenF4 --board-options pnum=GENERIC_F407VGTX -v -u
it is normal way to use Serial instance?
thanks for any help