Skip to main content
Matbonny
Associate III
Oct 25, 2026 2:24 AM UTC
Question

PA4 not fully pulling down on STM32U5G9ZJT6Q

Hi, good morning.

I’ve an application based on STM32U5G9ZJT6Q; I’ve deployed a board, based on that chip, in order to control and manage user functions for an audio Hi-fi preamplifier.

Among the interfaces which were configured, I’ve SPI1, connected to a volume control chip. NSS configured in software. Latch is coming from a GPIO (PA4).

Well, regardless the configuration of this pin I’m adopting, I cannot have this latch signal pulling down to 0. it settles at 2.2 Volt (when the pin is ‘reset’), this is the minimum level, from the nominal 3.15 Volt. This does not make my audio chip work, as this 2.2 level still gets interpreted as ‘high’. I measured those levels directly at the output of PA4, no other components connected.

Which is the root cause of this ? I mean, do you think it’s hardware failure on this GPIO only, or some conflict ?

I managed to get it working by utilizing another GPIO, but I’m keen to know the reason why.

For your information, here the other interfaces (all of them are working ok):

  • SPI1, as said
  • SPI2
  • SPI3
  • I2C1
  • I2C2
  • I2C3
  • LTDC, display. 24 bits RGB
  • About 10 interrupts configured on input GPIOs

Thank you very much in advance for your help !

Matteo

 

7 replies

AScha.3
Super User
Oct 25, 2026 10:01 AM UTC

Hi,

so you tested the pin without anything connected to it ?

> I measured those levels directly at the output of PA4, no other components connected.

  • checked : no short to adjacent pins ?  
  • 100% sure ?

Then this pin is defective. Maybe static discharge or connection to 5V or ...like this.

Any other 5G9 chip to compare ?

+

>I managed to get it working by utilizing another GPIO, but I’m keen to know the reason why.

By remap SPI ? 

If you feel a post has answered your question, please click on " Best Answer ".
Matbonny
MatbonnyAuthor
Associate III
Oct 25, 2026 4:10 PM UTC

Hi, yes, I’m pretty sure I tested directly at the PA4 output, nothing else connected.

I did not remap the full SPI, as the other two pins are good (clock and data). As the NSS was done in software, I could just pickup another free GPIO nearby.

Thanks

Matteo

Matteo
EXUE.2
ST Employee
Nov 2, 2026 6:52 AM UTC

generally, if one GPIO can not work, it maybe because user did not enable its port clock(here is port A). Then you can confirm its register is sure changed when you debug your code. 

if all these are no error, hardware issue is the greatest possibility。

Matbonny
MatbonnyAuthor
Associate III
Nov 5, 2026 4:11 AM UTC

Thank you very much for the contribution. Will check that. Matteo

Matteo
Associate II
Nov 5, 2026 5:01 AM UTC

It would be helpful if related schematics can be shared.Do you use custom board or official EVK?

Ozone
Principal
Nov 5, 2026 6:57 AM UTC

> Among the interfaces which were configured, I’ve SPI1, connected to a volume control chip. NSS configured in software.  Latch is coming from a GPIO (PA4).

This is somewhat ambiguous.
Do you mean PA4 is used as NSS ?

I would recommend to first check the DS and the reference manual for possible pin functionalities that might interfere.
Although things like JTAG/SWD or OSC don’t use PA4.

Second, I would test the pin with a standalone test code, which just initializes PA4 and toggles it, nothing else.

And third, I would recommend to check the pin’s configuration at runtime (with a debugger).
Compare the GPIO register contents with the expected settings, especially the AF register.

LCE
Principal III
Nov 5, 2026 7:54 AM UTC

We need to see schematics and setup code.

Maybe you told SPI to use and control NSS by setting the alternate function for PA4, then you tried to set it “manually” as if it were a regular GPIO?

Too much guessing...