2020-01-20 12:39 AM
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?
Solved! Go to Solution.
2020-01-20 02:05 AM
I don't use the 'H7, but searching this forum brought up this:
JW
2020-01-20 12:58 AM
> In the manual the pin is marked ANA which it annotates as Analog-only input,
Which manual? Where does it say so?
JW
2020-01-20 01:22 AM
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
2020-01-20 01:53 AM
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
2020-01-20 02:05 AM
I don't use the 'H7, but searching this forum brought up this:
JW
2020-01-20 02:46 PM
Many thanks for the info - need to explore/test and then I'll report findings
2020-01-22 04:58 AM
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.