cancel
Showing results for 
Search instead for 
Did you mean: 

NUCLEO STM32F303K8 PA3 pin doesn't work for UART receive

a1rWAXTA
Associate II

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.

11 REPLIES 11

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

 


@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 ...

@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

 

Yes, it's nucleo board :) 

a1rWAXTA
Associate II

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?

 

The Alternate Function tables list a lot of different options, the issue is picking one which is actually board appropriate, which depends on how it's physically wired.

https://www.st.com/en/evaluation-tools/nucleo-f303k8.html#cad-resources

https://www.st.com/resource/en/schematic_pack/nucleo-32pins_sch.zip

PA3 is exposed as an Analogue Input on the CN4 connector

nucleo32_f3.jpg

 

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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.

Could you please explain me this schematic? What is the part U2 and what is Extension connectors? PAx are MCU's pins and they can be assigned to various alternate functions but I'm limited to those what board realize, right? A3, D3 etc. mean analog pin, and digital pin (in/out) respectively, don't they? And hence I can assign (in cubemx) only those functions pointed on the schematic, even though cube allows me to assign other functions (for whatever reason?). For example PA15 can be only mapped to usart, and can't be mapped to general purpose input and PA3 is analog input/output? Do I understand it correct?


@a1rWAXTA wrote:

Could you please explain me this schematic? What is the part U2 


That is the STM32F303K8 microcontroller:

AndrewNeil_0-1719424635121.png


@a1rWAXTA wrote:

what is Extension connectors? 


Those are the 2 rows of pins on the sides of the Nucleo board - marked as "Arduino Nano connectors" in the UM:

AndrewNeil_1-1719424777956.png

 


@a1rWAXTA wrote:

 A3, D3 etc. mean analog pin, and digital pin (in/out) respectively, don't they? 


Those are the standard functions assigned in the Arduino Nano pinout - but the pins aren't restricted to just those functions.