cancel
Showing results for 
Search instead for 
Did you mean: 

stm32 h7 analog direct channel

A.Caliskan
Associate II

i am using stm32h723zg nucleo board, I'm using adc's direct channe, There are 2 different analog channel definition processes for the direct channel.what is the difference between the two.

A-)LL_SYSCFG_OpenAnalogSwitch(LL_SYSCFG_ANALOG_SWITCH_PC2|LL_SYSCFG_ANALOG_SWITCH_PC3);

B-) GPIO_InitStruct.Pin = LL_GPIO_PIN_2 | LL_GPIO_PIN_3;

 GPIO_InitStruct.Mode = LL_GPIO_MODE_ANALOG;

GPIO_InitStruct.Pull = LL_GPIO_PULL_NO;

LL_GPIO_Init(GPIOC, &GPIO_InitStruct);

İf ı use A,noise is increasing,,A is more than noise B

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

PC2 and PC2_C are potentially separate pins. The latter has a direct path to the ADC and allows for faster sampling, with some drawbacks.

0693W00000GZwOUQA1.pngSome chips, such as the one on this board, only have a PC2_C pin broken out. On these chips, if you want to use the ADC3_IN0 function, you do not need the switch closed. If you want to use functions of the PC2 pin, you need the switch closed so that the physical PC2_C pin is connected to PC2. The switch is closed by default.

0693W00000GZwOeQAL.pngPC2_C is always in analog mode and needs no initialization.

If the switch is closed, you are increasing capacitance on the line which can reduce noise (and accuracy).

More info here:

https://www.st.com/resource/en/application_note/dm00628458-getting-started-with-the-stm32h7-series-mcu-16bit-adc-stmicroelectronics.pdf

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

3 REPLIES 3
TDK
Guru

PC2 and PC2_C are potentially separate pins. The latter has a direct path to the ADC and allows for faster sampling, with some drawbacks.

0693W00000GZwOUQA1.pngSome chips, such as the one on this board, only have a PC2_C pin broken out. On these chips, if you want to use the ADC3_IN0 function, you do not need the switch closed. If you want to use functions of the PC2 pin, you need the switch closed so that the physical PC2_C pin is connected to PC2. The switch is closed by default.

0693W00000GZwOeQAL.pngPC2_C is always in analog mode and needs no initialization.

If the switch is closed, you are increasing capacitance on the line which can reduce noise (and accuracy).

More info here:

https://www.st.com/resource/en/application_note/dm00628458-getting-started-with-the-stm32h7-series-mcu-16bit-adc-stmicroelectronics.pdf

If you feel a post has answered your question, please click "Accept as Solution".

thank u your ansever.What is the disadvantage of direct channel?

Less protection on the pin. And there are fewer of them.

If you feel a post has answered your question, please click "Accept as Solution".