I need to know what the differential mode SDADC conversion code is. Is it 2's compliment such that the code:

int16_t D = (int16_t)HAL_SDADC_GetValue(&hsdadc3);

Will return to D a signed result such that if the positive input is less than the negative input D will be a negative value and that:

float V = D * VDDA / (1 << 16);

will result in V being the signed voltage across the inputs? (Assuming unity gain.)

I have looked for this in the documentation and I cannot find it. It would help for me to know where this is.

The processor is an STM32F373VCT.

int16_t D = (int16_t)HAL_SDADC_GetValue(&hsdadc3);

Will return to D a signed result such that if the positive input is less than the negative input D will be a negative value and that:

float V = D * VDDA / (1 << 16);

will result in V being the signed voltage across the inputs? (Assuming unity gain.)

I have looked for this in the documentation and I cannot find it. It would help for me to know where this is.

The processor is an STM32F373VCT.

Referring to application note AN4207 (Getting started with STM32F37x/38x SDADC (Sigma-Delta ADC)): "In differential mode, the SDADC converts the difference between SDADCx_AINyP and SDADCx_AINyM. The result can be either positive or negative depending on which input is at higher voltage."

In this application note, you find some examples that may be helpful for you.

Please let us know if you have any comment or feedback.

-Mayla-