cancel
Showing results for 
Search instead for 
Did you mean: 

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

Pavel A.
Evangelist III

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

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

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".

View solution in original post

2 REPLIES 2
TDK
Guru

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.
Evangelist III

Thank you TDK