2023-12-14 09:43 AM
Dear ST support team,
I'm facing an issue in reading ADC1 on a NUCLEO-U575ZI-Q evaluation board.
In some point of ADC1 range there is a huge gap between sampling points, Differential linearity error is around 25 LSB, clearly out of spec. This happens at spacing of about 500 points all along the input range.
See pictures below for a better view of the issue.
Some more details:
test on evaluation board NUCLEO-U575ZI-Q, NUCLEO575ZIQ$AT2, marking on microcontroller is "X"
STM32CubeIDE Version: 1.14.0 Build: 19471_20231121_1200 (UTC)
ADC is read in software trigger mode with ADC complete callback interrupt, tested different configuration, different resolution ( 14bit 12 bit ), clock, single ended or differential, oversampled or not, on different channel, but linearity error is always present.
Tested with VREF tied to 3V3 or with external reference without any difference.
Tested two different application code, one based from scratch application and one based on "ADC_SingleConversion_TriggerSW_IT" example, with same result
HAL_ADCEx_Calibration_Start makes no difference
Using ADC4 ( 12bit) gives no problem ( see picture )
The final implementation of the project will be on a STM32U595, which apparently has a different datasheet from the STM32U575, and I noticed that only after facing this problem.
As far as I can understand from the STM32U575 datasheet on the ADC characteristic, silicon rev X has some lower performance on ADC compared to the STM32U595, but still the Differential linearity error I'm measuring is way too big.
So question is: is this behaviour normal for this part on the evaluation board? If not, is there any advice on how to solve this issue?
Best regards,
Anton
Solved! Go to Solution.
2023-12-14 09:51 AM - edited 2023-12-14 10:03 AM
from rm :
so use hal ex_ linearity calibration , then test again.
(maybe need:
HAL_ADCEx_LinearCalibration_GetValue()
HAL_ADCEx_LinearCalibration_SetValue()
or
HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED);
- look in hal lib, i dont have u5 , this is from H7 )
just :
2023-12-14 09:51 AM - edited 2023-12-14 10:03 AM
from rm :
so use hal ex_ linearity calibration , then test again.
(maybe need:
HAL_ADCEx_LinearCalibration_GetValue()
HAL_ADCEx_LinearCalibration_SetValue()
or
HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED);
- look in hal lib, i dont have u5 , this is from H7 )
just :
2023-12-14 10:28 AM
Hi AScha.3
I've tried in both application the following
/* Perform ADC calibration */
if (HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET, ADC_SINGLE_ENDED) != HAL_OK)
{
/* Calibration Error */
Error_Handler();
}
without any difference in solving this specific issue. The device is an "X" revision, so it has no access to the extended calib mode.
I think anyway that this issue is not related to linearity, but more to "Differential linearity"
Best regards,
Anton
2023-12-14 10:52 AM - edited 2023-12-14 10:53 AM
Jumps of values around 2^N multiples is sometime indication of not stable reference (VREF+) enough. Nucleos may not be the pinnacle of analog design. Try to supply a better reference.
JW
2023-12-14 11:06 AM
Have you noticed:
HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED);
and also ADC_SINGLE_ENDED has to be ADC_DIFFERENTIAL_ENDED
:HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_DIFFERENTIAL_ENDED);
What is connected, can you post input interface circuits? What pins, fast-slow?
2023-12-14 11:08 AM
Already tested with external 2.5V reference and issue still present
Best regards,
Anton
2023-12-14 11:11 AM
Ha! I've missed the small detail :D. I'll try and let you know if this solves the issue.
If problem still persist, I'll post more details of the setup
Best regards,
Anton
2023-12-14 11:43 AM - edited 2023-12-14 11:46 AM
Using ADC_CALIB_OFFSET_LINEARITY removed the steps in the conversion, thank you :thumbs_up:
Best regards,
Anton