Use pins PB6 PB7 for USART [solved]
Posted: Wed Oct 14, 2020 1:46 am
Hello,
[edit: this might be the wrong thread for this question... sorry]
I've built a custom board with STM32F103C8 mcu and I'm trying to run hardware serial on PB6 And PB7, these are listed as alternative USART pins
I'm using the maple core, and the standard pc13 stm32duino bootloader
I create a board variant under arduino15/packages/stm32duino/hardware/STM32F1/.... and modify my board.h file to the pins I want to use.
#define BOARD_USART3_TX_PIN PB6
#define BOARD_USART3_RX_PIN PB7
I use Serial3 in my arduino code, but get no serial data out of the TX pin.
I'm also using the software Serial object to echo the same output to the port, for debugging.
I think this is the problem. When I check the pin number of PB6 using:
Serial.println(PB6);
> 22
When on my data sheet, PB6 is pin 42!!
Any suggestions on a fix?
thanks, Matthew
[edit: this might be the wrong thread for this question... sorry]
I've built a custom board with STM32F103C8 mcu and I'm trying to run hardware serial on PB6 And PB7, these are listed as alternative USART pins
I'm using the maple core, and the standard pc13 stm32duino bootloader
I create a board variant under arduino15/packages/stm32duino/hardware/STM32F1/.... and modify my board.h file to the pins I want to use.
#define BOARD_USART3_TX_PIN PB6
#define BOARD_USART3_RX_PIN PB7
I use Serial3 in my arduino code, but get no serial data out of the TX pin.
I'm also using the software Serial object to echo the same output to the port, for debugging.
I think this is the problem. When I check the pin number of PB6 using:
Serial.println(PB6);
> 22
When on my data sheet, PB6 is pin 42!!
Any suggestions on a fix?
thanks, Matthew