cancel
Showing results for 
Search instead for 
Did you mean: 

STM32G473 configure ADC in 16-bit mode

VDesa.1
Associate III

I need to configure STM32G473 ADC in 16-bit mode, Currently i configured it in 12 - bit mode it works fine but as per my application i need 16-bit resolution. As datasheet indicates it is possible to configure 16-bit mode by oversampling, but is there any example to implement 16-bit mode from HAL layer? or any suggestions?

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

Oversampling can be enabled in CubeMX.

There is also this:

https://github.com/STMicroelectronics/STM32CubeG4/tree/3e5243a22addb3cd323dba491eaf43c85ff448f3/Projects/NUCLEO-G474RE/Examples_LL/ADC/ADC_Oversampling_Init

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

View solution in original post

4 REPLIES 4
TDK
Guru

Oversampling can be enabled in CubeMX.

There is also this:

https://github.com/STMicroelectronics/STM32CubeG4/tree/3e5243a22addb3cd323dba491eaf43c85ff448f3/Projects/NUCLEO-G474RE/Examples_LL/ADC/ADC_Oversampling_Init

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

Is there any Example for implement oversampling in 16-bit mode at HAL layer or with multichannel DMA?

VDesa.1
Associate III

Thanks for reply the oversampaling is works.

is there any way to configure Dual mode ADC with ADC1 have 3 channel input ADC2 have 3 channel input using DMA with oversampaling?

TDK
Guru

From my understanding, this seems possible, but I am not digging into it. At the least, you could do the oversampling in software.

You're getting into some pretty specific applications. The examples are there to show the basics. If you want something more complex, you're probably going to need to take some time to develop it. Pretty sure there are Dual DMA examples. You would need to add hardware oversampling and configure the channels appropriately.

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