cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L4R5 Differential Channel Issue on ADC1_IN5 (using pins ADC1_IN5 / ADC1_IN6)

DAnsp
Associate II

On the STM32L4R5 I'm seeing unusual results reading a signal from the differential input ADC1_IN5 (Which uses ADC_IN5 / ADC_IN6 pins). When I apply an identical voltage to both differential pairs I see the reading vary with voltage, but the difference between the pair is obviously 0 Volts. I am not seeing this issue on any other of the differential pairs that I have tested (1/2, 2/3, 3/4, 4/5, 8/9, 10/11). I suspect it has something to do with the ADC1_IN5 being a high speed ADC pin and the ADC1_IN6 being a slow speed ADC pin.

I have generated an STM32Cube project to test the problem and have found the following results for the ADC reading based on the voltage applied to a number of differential pairs. Since the same voltage is applied to each pair, the resulting differential voltage is 0V. The value should be around 32767 for all readings but the 5/6 pair varies between 20,823 and 58,952.

Vref+ is 2.5V,

Vref- is 0V,

256x oversampling

Calibration performed prior to data acquisition:

adc_status = HAL_ADCEx_Calibration_Start(&hadc1,ADC_DIFFERENTIAL_ENDED);

0690X000006CORdQAO.png

Is there a known workaround for this problem other than using a different pair?

1 REPLY 1

I don't use the 'L4+ but things to try may be:

  • measuring input voltage *directly* on the pin
  • reading out and checking the related GPIO registers, mainly MODER and PUPDR
  • checking any related analog connection, e.g. those given by OPAMP_CSR.VP_SEL/VM_SEL

JW