2024-07-30 01:52 AM
Hello Friends,
I use STM32F373 for 16-bit SADC.
I have single-ended input 0V to 3.3V. VREFSD+=3.3V and VREFSD- =0V
When input Voltage change from 0V to 3.3V I get values 0 to 32767. Is it not possible to get 16-bit (65535) data?
Always signed?
my configuration;
ConfParamStruct.InputMode = SDADC_INPUT_MODE_SE_OFFSET;
ConfParamStruct.Gain = SDADC_GAIN_1_2;
ConfParamStruct.CommonMode = SDADC_COMMON_MODE_VSSA;
Thanks a lot.
Solved! Go to Solution.
2024-07-30 03:15 AM
1.65V to 3.3V always 32767.
2024-07-30 03:21 AM
32767.
HAL_SDADC_Start(&hsdadc1);
HAL_SDADC_PollForConversion(&hsdadc1, 100);
adcResult = HAL_SDADC_GetValue(&hsdadc1); // unsigned int adcResult;
2024-07-30 04:11 AM
> SDADC_INPUT_MODE_SE_OFFSET
With this, values will always be 0 to 32767.
You want single ended zero reference mode instead. Not offset.
The output will still be signed, but the full range of 65535 values will be present.
2024-07-30 04:34 AM
Thank you very much. it worked.