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.

TMS320F28375S: 16-bit ADC

Part Number: TMS320F28375S


Hello,

in our project we would like to switch from 12-bit to 16-bit ADC. I'm however facing some trouble getting 16-bit values out of ADCRESULT.

In software I found out the change takes place in 2 function calls:

 - ADC_setMode() needs parameters changed from ADC_RESOLUTION_12BIT to *_16BIT and ADC_MODE_SINGLE_ENDED to ADC_MODE_DIFFERENTIAL.

 - ADC_setupSOC() needs a change in acquisition period and channel has "changed" from ADC_CH_ADCIN0 to ADC_CH_ADCIN0_ADCIN1.

In hardware the change included connecting:

ADCIN0 to signal 0-3V

ADCIN1 to signal 1.5V static

VSSA to GND

VREFLO to GND

VREFHI to 3.00V (reference)

In ADCRESULT0 I am still reading values typical for our previous 12-bit setup (in idle, values around 2048 which would hint I am still reading 12-bit results). I believe something is wrong in my software setup rather than in the HW connections (I expected values around 32 768).

I've checked register values touched by the two functions mentioned above and ADCCTL2.SIGNALMODE has indeed changed to 1 and so has the RESOLUTION field. CHSEL in ADCSOC0CTL is correctly set 0 for ADCIN0_ADCIN1.

I know it's hard to tell what might be wrong based on my description, but do you perhaps know of some test I could do to verify correct bitness of the AD conversion output?

Thank you

Jiri

  • Jiri,

    Can you fix ADCINA0 to 1.5V as well and see if you get the mid-code 32768 output?  For DE mode, you will not be able to fix ADCINA1 to 1.5V always, it will need to move about the common mode equal distant to ADCINA0 to get the desired 16-bit code.

    I think the register settings are correct, it should only be the setMODE and setSOC functions that change as you have noted.

    Best,

    Matthew

  • Hi Matthew,

    thank you for your quick answer. I tried what you suggested and got similar results so I got a little bit suspicious and tried my SW on LaunchPad and there the results are as expected (both in idle and connected to noise generator). I guess it was HW issue after all.

    Thank you!

    Jiri

  • Jiri,

    I wanted to clarify a bit, I didn't realize this on my original post, but the F28375 class of device does not have 16-bit ADC enabled.  Below image is from the DS, since the LaunchPad is F28379D it does have 16-bit ADC included.  So, even though you write the register bits to enable the 16-bit mode, nothing will happen and it will stay in 12-bit mode.

    From a feature POV vs price the F28377S device has the 16-bit ADC, but not some of the other features of the F28379 that you may not need.

  • Ahh I see, thanks a lot Matthew. You just saved us a lot of confusion x)

    I need to keep this table somewhere handy, this is not the first time it'd sort out a problem.

    Thanks!