cancel
Showing results for 
Search instead for 
Did you mean: 

STM32Cube for STM32U5 cannot set ADC Oversampling Ratio value

AGula.1
Associate

Hi,

I'm using STM32Cube to configure an STM32U575. I'm trying to configure the ADC4 so that oversampling is used. I need to set the Sequencer option to "Sequencer set to not fully configurable" so I have access to the additional channel inputs (IN15, IN16). However, when I set the Oversampling Mode to "Enabled", there is no way to set the Oversampling Ratio value. Only the Oversampling Right Shift value can be set. If I change the Sequencer option to "Sequencer set to fully configurable", the Oversampling Ratio option appears.

I can't find anywhere in the reference manual as to why the Oversampling Ratio value can't be set when in this configuration. Can someone help me understand why this option isn't available?

2 REPLIES 2
Semer CHERNI
ST Employee

Hello @AGula.1​ 

First let me thank you for posting.

I was able to reproduce the issue.

This problem is raised internally to be reviewed. I'll keep you posted with the updates.

Internal ticket number: 136709(This is an internal tracking number and is not accessible or usable by customers).

In the meanwhile, I propose that you add the following instruction in the static void MX_ADC4_Init(void) function to set the over sampling value:

hadc4.Init.Oversampling.Ratio = ADC_OVERSAMPLING_RATIO_2; //use the ratio value you want in this case I set it to ADC_OVERSAMPLING_RATIO_2.

Kind regards,

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Semer CHERNI
ST Employee

Hello @AGula.1​ 

The issue is fixed in the STM32CubeMx 6.7.0 available under this link.

Semer.

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.