Skip to main content
TDJ
Senior III
October 30, 2023
Solved

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

  • October 30, 2023
  • 2 replies
  • 1166 views

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

This topic has been closed for replies.
Best answer by Souhaib MAZHOUD

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

2 replies

ST Employee
October 31, 2023

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 MAZHOUDBest answer
Technical Moderator
October 31, 2023

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

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.