Skip to main content
Associate II
June 26, 2024
Question

NUCLEO STM32F303K8 PA3 pin doesn't work for UART receive

  • June 26, 2024
  • 11 replies
  • 3345 views

Hello,

I came across a behavior that I don't understand. In the board's datasheet, I can clearly see alternate function for pin PA3 is USART2_RX but once set, it doesn't work. When I set USART_RX on pin PA15, it works just fine. Can someone explain why it doesn't work? Maybe there are some limitiations which I don't understand or it is MCU malfunction.

This topic has been closed for replies.

11 replies

waclawek.jan
Super User
June 26, 2024

What hardware is this, a Nucleo board? Are you sure PA3 is connected to your signal source?

Read out and check GPIO and UART register settings.

JW

 

Andrew Neil
Super User
June 26, 2024

@waclawek.jan wrote:

What hardware is this, a Nucleo board?


@a1rWAXTA  If it is a Nucleo board, note that the ST-Link's VCP may be connected to PA3:

https://community.st.com/t5/stm32-mcus-boards-and-hardware/i-cannot-receive-data-while-using-usb-to-uart-for-nucleo-f411re/m-p/690201/highlight/true#M19855

 

And if it's not a Nucleo board, you still need to check that there's nothing else driving it ...

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
waclawek.jan
Super User
June 26, 2024

@Andrew Neil,

the STM32xxxKx would be a 32-pin Nucleo, and that uses PA15 as the Rx pin for the on-board VCP.

Although, maybe that's what confuses @a1rWAXTA ...?

JW

 

a1rWAXTAAuthor
Associate II
June 26, 2024

I stumbled upon something in the User Manual (UM1956)

a1rWAXTA_0-1719419339659.png

I am confused now. Why in alternate function table, it is shown that PA3 can be mapped to USART_RX but here is written that PA15 is connected to ST-LINK. What does it mean? What exactly is ST-LINK in that case?

 
Andrew Neil
Super User
June 26, 2024

So you are using a Nucleo-32 board?

"ST-Link" is the programmer/debugger built into the Nucleo board:

AndrewNeil_0-1719420344807.png

More details in section 6.3 of the User Manual (UM1956).

 


@a1rWAXTA wrote:

Why in alternate function table, it is shown that PA3 can be mapped to USART_RX


That's a function of the chip - irrespective of what board it's mounted on.

 


@a1rWAXTA wrote:

but here is written that PA15 is connected to ST-LINK.


That's about the wiring on the board - which is external to the chip.

 

EDIT:

The chip is highlighted in red; the board in blue:

AndrewNeil_1-1719420733530.png

Note how the board is providing connections from the chip (the STM32 microntroller) to the Button, the LED, and the ST-Link.

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.