Skip to main content
PMath.4
Senior III
January 20, 2020
Solved

Can the PC2_C pin be used for digital I/O (STM32H743)

  • January 20, 2020
  • 6 replies
  • 2638 views

This seems very confusing. In the manual the pin is marked ANA which it annotates as Analog-only input, and yet it has a bunch of special functions that are digital in nature (e.g. SPI_MISO, FMC_SDNE0) and both input and output. CubeMX allows me to set the pin as a digital input or output and on my test systems (3) it works as expected as a digital input and output when configured. However, I have one user who reports the pin isn't working as a digital I/O. Can someone explain. Is CubeMX wrong to allow me to set the pin as a digital output?

This topic has been closed for replies.
Best answer by waclawek.jan

I don't use the 'H7, but searching this forum brought up this:

https://community.st.com/s/question/0D50X0000AxFsTqSQK/stm32h743z-lqfp144-gpio-not-working-on-pc2c-and-pc3c

JW

6 replies

waclawek.jan
Super User
January 20, 2020

> In the manual the pin is marked ANA which it annotates as Analog-only input,

Which manual? Where does it say so?

JW

PMath.4
PMath.4Author
Senior III
January 20, 2020

Chip datasheet - pin descriptions. Table 7 gives the legend. The the PIN/Ball definition table gives the pin functions and uses the ANA legend on pin PC2_C. Note how the special functions are the same on the 240 pin part (PC2) and the other parts (PC2_C). Only the analog channels are different

waclawek.jan
Super User
January 20, 2020

As footnote 6 in that table explains, on packages where the digital pin (PC2) is not brought out to physical pin/ball, PC2_C pin can be connected to the digital one internally on the chip, using an analog switch, see description of SYSCFG_PMCR.PC2SO in RM. See also Analog inputs connected to ADC inputs figure in the GPIO chapter of RM.

JW

waclawek.jan
waclawek.janBest answer
Super User
January 20, 2020
PMath.4
PMath.4Author
Senior III
January 20, 2020

Many thanks for the info - need to explore/test and then I'll report findings

PMath.4
PMath.4Author
Senior III
January 22, 2020

Looks like a faulty analog switch in one particular CPU. All others work well and SYSCFG_PMCR.PC2SO is reading correctly on the faulty unit. Thanks for the help.