cancel
Showing results for 
Search instead for 
Did you mean: 

Nucleo-H753ZI board Connect ADC inputs to GND, the readings are varied between -15 - +15

RongShengWang
Associate III

Nucleo-H753ZI board. ADC1 configurations: INPUT: SINGLE-END

Sample clock rate = 5Mhz

Sample rate = 10Khz,

Sample Time = 16.5 cycles,

Resolution = 12-bit

Scan 256 times

Connect the defined two ADC input channels to GND.

The 256 readings FOR EACH INPUT are varied between (-15 - +15), more or less, while they should be read as zeros.

Question: Can it be fixed How to fix it?

Could you do the same test to confirm it?

Thanks,

 

Rong

12 REPLIES 12
Chris21
Senior III

The lowest value a single-ended ADC channel can have is 0, how do you get negative numbers?

Sorry, I pasted wrong data. It should be

5, 0, 5, 0, 12, 0, 15, 1, 0, 0, 0, 0, 3, 5, 17, 0, 0, 0, 0, 0, 0, 15, 0, 11, 17, 16, 0, 0, 12, 0, 4, 15, 7, 0, 0, 0, 0, 0, 0, 0, 5, 10,

Total 256's. I just listed first 40's.

Thanks

Chris21
Senior III

5, 0, 5, 0, 12, 0, 15, 1, 0, 0, 0, 0, 3, 5, 17, 0, 0, 0, 0, 0, 0, 15, 0, 11, 17, 16, 0, 0, 12, 0, 4, 15, 7, 0, 0, 0, 0, 0, 0, 0, 5, 10, 14, 0, 0, 0, 4, 13, 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 16, 8, 0, 16,12, 0, 13, 0, 0, 9, 0, 0, 0, 3, 0, 0, 15, 0, 0, 13, 0, 1, 16, 0, 0, 16, 9, 0, 0, 18, 0, 13, 0, 0, 0, 17, 0, 0, 0, 6, 0...}

"Are you executing the calibration functions?"

Of course.

Data

5, 0, 5, 0, 12, 0, 15, 1, 0, 0, 0, 0, 3, 5, 17, 0, 0, 0, 0, 0, 0, 15, 0, 11, 17, 16, 0, 0, 12, 0, 4, 15, 7, 0, 0, 0, 0, 0, 0, 0, 5, 10, 14, 0, 0, 0, 4, 13, 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 16, 8, 0, 16,12, 0, 13, 0, 0, 9, 0, 0, 0, 3, 0, 0, 15, 0, 0, 13, 0, 1, 16, 0, 0, 16, 9, 0, 0, 18, 0, 13, 0, 0, 0, 17, 0, 0, 0, 6, 0...}


@RongShengWang wrote:

"Are you executing the calibration functions?"

Of course.

Data

5, 0, 5, 0, 12, 0, 15, 1, 0, 0, 0, 0, 3, 5, 17, 0, 0, 0, 0, 0, 0, 15, 0, 11, 17, 16, 0, 0, 12, 0, 4, 15, 7, 0, 0, 0, 0, 0, 0, 0, 5, 10, 14, 0, 0, 0, 4, 13, 0, 13, 0, 0, 0, 0, 1, 0, 0, 0, 0, 16, 8, 0, 16,12, 0, 13, 0, 0, 9, 0, 0, 0, 3, 0, 0, 15, 0, 0, 13, 0, 1, 16, 0, 0, 16, 9, 0, 0, 18, 0, 13, 0, 0, 0, 17, 0, 0, 0, 6, 0...}


And to be sure we're all on the same page, how are you exactly calibrating?

CANable V3 firmware | CAN-X CAN bus analyzer software for CANable V3 |
TimerCallback tutorial! | UART and DMA Idle with multiple UART instances tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.

" how are you exactly calibrating?"

 

if (HAL_ADCEx_Calibration_Start(&hadc1, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED) != HAL_OK)
  {
      Error_Handler();
  }
  if (HAL_ADCEx_Calibration_Start(&hadc2, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED) != HAL_OK)
  {
      Error_Handler();
  }
  if (HAL_ADCEx_Calibration_Start(&hadc3, ADC_CALIB_OFFSET_LINEARITY, ADC_SINGLE_ENDED) != HAL_OK)
  {
      Error_Handler();
  }

You may need to try improving VDDA/VREFP filtering. You can also try enable oversampling.

CANable V3 firmware | CAN-X CAN bus analyzer software for CANable V3 |
TimerCallback tutorial! | UART and DMA Idle with multiple UART instances tutorial!

If you find my solution useful, please click the Accept as Solution so others see the solution.

What is your experience? Or you just guess? I am using Nucleo-H753ZI board.