Skip to main content
Pavel A.
Super User
May 30, 2021
Solved

STM32H7 , how to set the "analog switch" for _C pins

  • May 30, 2021
  • 2 replies
  • 1842 views

Dear experts,

I'm using Cube to assign pins for my stuff (yep...) and it offers some pins with _C sufix (PC2_C, PC3_C).

From the RM0433 fig.75 I gather this is something with the "analog switch" and in order to use these _C pins as AF for some device (SPI2 in my case) need to set some SYSCFG pins and connect them. Is this all that is needed? what are side effects?

If these switch bits are 0 (close) what should be done to the ADC to not interfere with SPI operation?

(the board is Nucleo H743)

-- pa

This topic has been closed for replies.
Best answer by TDK

Since PC2 doesn't exist on that package, you need to close the analog switch so that PC2_C connects to PC2 internally and can access the AF modes for PC2.

> Is this all that is needed?

Yes.

> If these switch bits are 0 (close) what should be done to the ADC to not interfere with SPI operation?

Same as a normal pin, just don't use it for multiple modes (SPI2 and ADC) at the same time. It's similar to if PC0 and PC1 (for example) were tied together. You could only use one at a time, and the other one would need to be high z in order not to interfere.

2 replies

TDK
TDKBest answer
May 31, 2021

Since PC2 doesn't exist on that package, you need to close the analog switch so that PC2_C connects to PC2 internally and can access the AF modes for PC2.

> Is this all that is needed?

Yes.

> If these switch bits are 0 (close) what should be done to the ADC to not interfere with SPI operation?

Same as a normal pin, just don't use it for multiple modes (SPI2 and ADC) at the same time. It's similar to if PC0 and PC1 (for example) were tied together. You could only use one at a time, and the other one would need to be high z in order not to interfere.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Pavel A.
Pavel A.Author
Super User
May 31, 2021

Thank you TDK