2018-09-13 02:03 AM
Hi all,
I am doing some testing with the ADCs of an STM32F0 and an STM32F3 using 2 development boards: Nucleo-F030R8 and STM32F3DISCOVERY. I am finding the accuracy of the measurements is much better on the F0 (<0.1% FS) than on the F3 (up to 1% FS).
To make sure I get the best of my ADC measurement, I am doing the following with both micros:
- ADC configured as slow as possible: Synchronous clock mode divided by 4, sampling of 601.5 cycles
- Averaging of several values (up to 100 on the F3)
- Calibration of the ADC via the HAL_ADCEx_Calibration_Start function
- Accurate measurement of the power supply using the internal Vref
Without going further in my testing, I can see that on the F0 board, the measured power supply voltage is very close to the voltage I get using a multimeter, whereas it is not accurate at all (1% error) and not consistent on the F3 board.
One of the differences I found on my setting is the clock speed: 8MHz on F0, 48MHz on F3 using PLL. Setting the clock speed to 8MHz on the F3 improves the measurements, but still not quite as good as on the F0 board.
So, I am wondering what could be the origin of such difference. Is it related to the chip itself? Or is the layout of the Nucleo board better than the Discovery one? Or could is there anything else I am missing that would affect this accuracy?
A few more information on my working environment:
- STM32CubeMX v4.22.1
- Firmware package for Family STM32F3 v1.9.1
- Firmware package for Family STM32F0 v1.9.0
- Keil MDK-ARM Plus v5.25.2.0
- Compiler v5.06 update 6 (build 750)
Thank you in advance for any help.
Julien