2019-10-15 11:07 PM
2024-01-23 7:15 AM
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.
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
2024-02-01 10:53 AM
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.
2025-03-07 12:27 AM
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.