Skip to main content
PMath.4
Senior III
Jan 20, 2020 8:39 AM UTC
Solved

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

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.
waclawek.jan
waclawek.janBest answer
Super User
Jan 20, 2020 10:05 AM UTC

6 replies

waclawek.jan
Super User
Jan 20, 2020 8:58 AM UTC

> 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
Jan 20, 2020 9:22 AM UTC

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
Jan 20, 2020 9:53 AM UTC

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
Jan 20, 2020 10:05 AM UTC
PMath.4
PMath.4Author
Senior III
Jan 20, 2020 10:46 PM UTC

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

PMath.4
PMath.4Author
Senior III
Jan 22, 2020 12:58 PM UTC

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.