Skip to main content
HQIN.1
Associate
December 26, 2019
Question

Cant't send message with usart2.

  • December 26, 2019
  • 5 replies
  • 1743 views

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
December 26, 2019

Elaborate, which chip and which pins/alternate functions?

A peripheral without configured pins is a blind guy.

HQIN.1
HQIN.1Author
Associate
December 26, 2019

0690X00000BuyAMQAZ.pngi used nucleo f401 so is stm32f401,

berendi
Principal
December 27, 2019

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
December 28, 2019

check datasheets whether pin PA2 and PA3 for usart2

otherwise could be hardware fault