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.

ADC_12 module operation on MSP430F5438a

Hello,

I probably misunderstood something in operation of ADC12 module on MSP430.

I have configured it to run from ACLK (which is 32768)

The sample time was set to 64. This shall probably give around 2 milli per sample time. (13 clocks of conversion + sample time of 1.95 milli)

on the scope upon entry into the end of conversion ISR I toggle IO in order to measure the time between the sample. I see from the scope that the time is around 2.3 milli.

Can you please explain why is that and what I am missing?

The source code for configuration is:

  ADC12CTL0 = ADC12ON + ADC12SHT0_4 + ADC12MSC; // , set sampling time

// Use sampling timer, set mode to pulse mode, Source: ACLK
ADC12CTL1 = ADC12SSEL_1 + ADC12SHP + ADC12CONSEQ_2;

// Configure channel 4 (P6.4) to be source for hte ADC
ADC12MCTL0 |= ADC12INCH_4;

ADC12IE = 0x01; // Enable ADC12IFG.0
ADC12CTL0 |= ADC12ENC; // Enable conversions

// we want 12 bit resolution, turn off temperature sensor,
ADC12CTL2 |= ADC12TCOFF + ADC12RES_2;

ADC12CTL0 |= ADC12SC; // Start conversion
I will really appreciate help :-)
Igor

**Attention** This is a public forum