Skip to main content
This topic has been closed for replies.
Best answer by Imen.D

Hello @Byann.1 ,

Please refer to the last release of RM0433 which contains update and correction.

The contradiction in the RM0433 Rev6 mentioned by waclawek.jan was already corrected in the Section: "Single ADC operating modes support when oversampling" to remove the mention that the offset correction is not supported in oversampling mode.

3 replies

Byann.1
Associate II
January 23, 2024

I'm facing to the same problem. I tried to use hardware oversampling and offset but I could not get the good conversion. 

As show in the previous post with some screenshot of the reference manual,  I don't know if it's possible or not.

Please find also below, another sentence describing some restrictions on oversampling.

Byann1_0-1706022625299.png

Finally my question: is it possible to use both oversampling and offset?

If yes, how to use it and what are exactly the restrictions?

Thanks in advanced for your help

 

 

Imen.DBest answer
ST Technical Moderator
February 1, 2024

Hello @Byann.1 ,

Please refer to the last release of RM0433 which contains update and correction.

The contradiction in the RM0433 Rev6 mentioned by waclawek.jan was already corrected in the Section: "Single ADC operating modes support when oversampling" to remove the mention that the offset correction is not supported in oversampling mode.

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
Zed
Associate III
March 7, 2025

For those who still looking for the offset implementation in oversampling mode I paste here a line from a program that seems to work:

if (HAL_OK == HAL_ADC_Stop_DMA(&hadc2))
{
 LL_ADC_SetOffset(hadc2.Instance, LL_ADC_OFFSET_1, LL_ADC_CHANNEL_3, offset << 10); // 10 At the end means that you use 10 bit shifting oversampling
}

 This has something to do with where exactly this offset would be substracted - before oversampling or after oversampling. An RM states that clearly somewhere. Don know exact place, but it is there.