This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS320F280049C: ADC Module PPB Error Calculation

Part Number: TMS320F280049C


I am looking at the technical reference manual for TMS320F28004x Piccolo Microcontrollers (Literature Number: SPRUI33A).

Referring to 13.1.9.2 PPB Error Calculation, which states "The post-processing block will automatically subtract the value in the OFFREF register from the ADCRESULT value and store it in the ADCPPBxRESULT register. This subtraction will produce a sign-extended 32-bit result."

The intended application will be to obtain the error between the reference setpoint and the ADC measurement for SMPS control, and the result will at times be negative. The control calculation will use the floating point unit.

Can you please provide some guidance on how to properly process the data so it gets interpreted correctly? For example, the 13.4.1.2.17 ADCPPB1RESULT Register section says "If the conversion associated with this Post Processing Block is a 12-bit conversion, the SIGN bits extend down to bit 12, and all reflect the same value as bit 12." I am not sure if I need to do some post processing of all those sign bits to get the math to work out.

Thank you!