Showing results for 
Search instead for 
Did you mean: 

SDADC Returns 0x7FFF Regardless of Input Voltage

Associate II
Posted on July 27, 2016 at 05:17

The processor is an STM32F373VCT6. I am software triggering SDADC1 every second using this call each time:

HAL_SDADC_InjectedStart_DMA( &hsdadc1, (uint32_t *)SDADC1_Data, SDADC1_Data_Size );

The DMA buffer size has 200 elements and SDADC1_Data is a type uint16_t array. Before calling HAL_SDADC_InjectedStart_DMA() for the first time I prefilled all elements of SDADC_Data with a value of 0x1 so I know for sure DMA is filling it with something.

The input to SDADC1 is set for single ended zero volt reference mode.

One of the two inputs it scans is set at ground, and the other at VDDA.

DMA is filling each element of SDADC1_Data[] with the value 0x7FFF. It

does not matter what the input voltage is, the conversion data is always 0x7FFF.

I need to know what has gone wrong here.


e attached files:

�Processor Power and Gnd.png� is an excerpt of the schemati

c showing the power and ground connections to the processor. GND and AGND are connected together elsewhere in the schematic.

�TEC_Driver_True_Studio.ioc� is the STM32C

ubeMX project file the initial firmware project files were generated from.

Posted on July 27, 2016 at 23:56

I have no experience with SDADC and would not touch Cube with a stick, but generally it's worth to do things step by step. Initialize the SDADC, then in a cycle manually launch conversions, poll for conversion end, read out the result and visualise it somehow (send to PC, store to a variable/array).