stm32duino / Arduino_Core_STM32

STM32 core support for Arduino
https://github.com/stm32duino/Arduino_Core_STM32/wiki
Other
2.81k stars 968 forks source link

How can i use Hardware serial in STM32F7? #246

Closed Vicky-S closed 6 years ago

Vicky-S commented 6 years ago

How can i use Serial6 and Serial7 in STM32F746NG?

fpistm commented 6 years ago

In your sketch, for example, to use USART6 add: HardwareSerial mySerial(PC7,PC6); or HardwareSerial mySerial(USART6);

Which will use the first Rx/Tx pins for this instance in PinMap_UART_RX/TX array: https://github.com/stm32duino/Arduino_Core_STM32/blob/master/variants/DISCO_F746NG/PeripheralPins.c#L235

So for DISCO_F746, PC7/PC6. Same way for UART7.

Vicky-S commented 6 years ago

Thanks bro.

It works very fine.