Skip to main content
HQIN.1
Associate
Dec 26, 2019 5:38 PM UTC
Question

Cant't send message with usart2.

Hi All,

i'am beginner of using libary HAL, i use CubeMX to generate code. At first, I use usart1 to send message and i work, and then i try to use usart2 but i cant can't send any message.

these two code is almost the same.

This topic has been closed for replies.

5 replies

S.Ma
Principal
Dec 26, 2019 5:55 PM UTC

Elaborate, which chip and which pins/alternate functions?

A peripheral without configured pins is a blind guy.

HQIN.1
HQIN.1Author
Associate
Dec 26, 2019 6:00 PM UTC

0690X00000BuyAMQAZ.pngi used nucleo f401 so is stm32f401,

berendi
Principal
Dec 27, 2019 11:47 AM UTC

There should be no pullup (nor pulldown), and I/O speed should be low (unless the baudrate is higher than 4 MHz).

Check the board user manual, PA2 and PA3 might be connected to the onboard debug adapter by default, and not available on the pin headers, unless you modify some solder bridges first.

dbgarasiya
Senior
Dec 28, 2019 10:16 AM UTC

check datasheets whether pin PA2 and PA3 for usart2

otherwise could be hardware fault