cancel
Showing results for 
Search instead for 
Did you mean: 

ADC data management - good news and bad news (STM32U5xx CubeMX bug?)

TDJ
Senior III

According RM0456, section 33.4.27 Data management, p. 1287
"The offset can be used to convert unsigned data to signed data (for example, in 14-bit mode, the offset value is equal to 0x2000). The offset correction is also supported in oversampling mode. For the oversampling mode, offset is subtracted before OVSS right shift applied."
This is the good news. The bad news is that CubeMX believes that the opposite is true.
But then on page 1304 in section 33.4.31 Oversampler I found this statement:
"Offset correction is not supported in oversampling mode."
Could anyone explain? I am confused.
My tests show that offset and oversampling can be used simultaneously, but it is quite possible that after several hours of working with this technology I start seeing things.

ADC-offset1.png

ADC-offset2.png

ADC-offset3.png

1 ACCEPTED SOLUTION

Accepted Solutions
Souhaib MAZHOUD
ST Employee

Hello @TDJ 

First let me thank you for highlighting this issue.

I confirm that CubeMX should allow the setting of Offset in Oversampling mode.

Issue is reported internally to our team (Internal ticket number: 165370) and this will be fixed as soon as possible.

Thank you

Souhaib

View solution in original post

2 REPLIES 2
Aime
ST Employee

Hi @TDJ ,

 

Thank you for sharing this, yes I can confirm that the offset correction feature is available in Oversampling mode.
We have already discovered this mistake and it will be fixed in the next versions of the Reference Manual and STM33CubeMX.

 

Best regards,

Aime

Souhaib MAZHOUD
ST Employee

Hello @TDJ 

First let me thank you for highlighting this issue.

I confirm that CubeMX should allow the setting of Offset in Oversampling mode.

Issue is reported internally to our team (Internal ticket number: 165370) and this will be fixed as soon as possible.

Thank you

Souhaib