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.

  • TI Thinks Resolved

MSP430F5359: ADC gets stuck on raw 2048

Genius 4010 points

Replies: 6

Views: 287

Part Number: MSP430F5359

I am using MSP430F5359, my raw ADC value get stuck at 2048.  For example, if my voltage is such that the raw values are 1900, I can keep increasing the voltage till it is about 1990, then the raw values jump to 2048 and then stay at 2048 till the voltage is high enough for 2050, then the become linear and normal again.  Any ideas why?

the ADC12A is configured using the following code:

    REFCTL0 &= ~REFMSTR;  // Reset REFMSTR to hand over control to
                          // ADC12_A ref control registers

    ADC12CTL0 = ADC12SHT1_5 +  // Sample Hold
                ADC12SHT0_5 +  // Sample Hold
                ADC12REF2_5V;  // Enable 2.5Volt Reference

    ADC12CTL1 = ADC12SHP +         // use sampling timer
                ADC12CONSEQ_0 +    // Use sampling timer, single sequence
                ADC12CSTARTADD_9;  // Start scan with channel 9

    ADC12CTL2 = ADC12RES_2 +    // 12 bit resolution
                ADC12SR +       // slower, lower power sampling rate
                ADC12REFBURST;  // Reference is only on when converting

    ADC12MCTL9 = ADC12INCH_4 + ADC12SREF_1;  // Press 1,Vr+=Vref+ and Vr-=AVss

To begin sampling the system executes the following code:

    ADC12CTL0 |= ADC12ON +     // Turn on ADC
                 ADC12REFON +  // Turn on the voltage reference
                 ADC12ENC;     // Enable Conversion

    ADC12IE |= ADC12IE9;  // Enable interrupt

Then each conversion is started by:

ADC12CTL0 |= ADC12SC;  // Enable Conversion

MSP430F5335, MSP430F5359, CCS8, C++14, Windows 10

  • Hi,

    What voltage are you powering the device at? And what are you setting the reference voltage to?

    Regards,
    Nathan
  • In reply to Nathan Siegel:

    The internal reference is used at 2.5 volts. The device this happens when the input voltage is about 1.25 volts. This happens on other devices as well. The ADC register gets stuck on raw value 2048 for voltages between somewhere 1.2 to 1.255. Outside of that voltage range, the values are linear.

    MSP430F5335, MSP430F5359, CCS8, C++14, Windows 10

  • In reply to Silver Diamond:

    This issue goes away when I do not set ADC12SR, why would this be?

    MSP430F5335, MSP430F5359, CCS8, C++14, Windows 10

  • In reply to Silver Diamond:

    Hi,

    Setting that bit reduces the maximum sampling rate from 200 ksps to 50 ksps. Depending on how quickly you are changing your signal, this could be causing an issue.

    Regards,
    Nathan
  • In reply to Nathan Siegel:

    How quickly can you change, is there rate of change in the spec? Why does it cause an issue? What is the root cause of the issue?

    MSP430F5335, MSP430F5359, CCS8, C++14, Windows 10

  • In reply to Silver Diamond:

    Hi,

    There is no limit on the frequency of the input signal, but if it is too fast relative to the sampling rate, you could be missing information. By using a faster sampling rate, you may no longer see the issue.

    Additionally, have you used a DMM or oscilloscope you probe the signal that you are feeding into the ADC to make sure that this is not an issue with the signal generator (or whatever you are using to generate the input to the ADC)?

    Regards,
    Nathan

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.