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.

CCS/MSP430FR5858: Can't congifure temperature sensor

Part Number: MSP430FR5858

Tool/software: Code Composer Studio

I need to use a MSP430FR5858IRHAT to measure the temperature and I have configured it following the steps from the datasheet then I try to read it but it doesn't work. :

// CONFIGURE ADC12
    // Turn on ADC and enable multiple conversions
    ADC12CTL0 = ADC12SHT0_2 | ADC12ON | ADC12MSC;
    //ADC12CTL0 = ADC12SHT0_2 | ADC12ON;
    // Sampling timer, single sequence
    ADC12CTL1 |= ADC12SHP | ADC12CONSEQ_1;
    //ADC12CTL1 |= ADC12SHP;
    // 12-bit conversion
    ADC12CTL2 |= ADC12RES_2;

    // Se pode en modo lectura de temperatura
    //ADC12CTL3 |= ADC12TCMAP | ADC12ICH0MAP | ADC12BATMAP;
    ADC12CTL3 |= ADC12TCMAP;

    // Enable ADC interrupt on MEM1
    //ADC12IER0 |= ADC12IE1;
    // A0 select, Vref=1.2V
    ADC12MCTL0 |= ADC12INCH_0;
    // A1 select, Vref=1.2V
    ADC12MCTL1 |= ADC12INCH_1;
    // A2 select, Vref=1.2V, End of Sequence
    //ADC12MCTL2 |= ADC12INCH_2 | ADC12EOS;
    ADC12MCTL2 |= ADC12INCH_2;
    // A3 select, Vref=1.2V
    ADC12MCTL3 |= ADC12INCH_30 | ADC12EOS;
    //ADC12MCTL3 |= ADC12INCH_30 | ADC12EOS;
    // A4 select, Vref=1.2V, End of Sequence
    //ADC12MCTL4 |= ADC12INCH_4 | ADC12VRSEL_0 | ADC12EOS;

    ADC12CTL0 |= ADC12ENC; // Sampling start

    ADC12CTL0 |= ADC12SC;


    // Espera hasta que se realicen las lecturas
    while (!(ADC12IFGR0 & BIT0));

     temperature_value = ADC12MEM3;

Did anyone have that problem? How can I fix it?

Thank you.

**Attention** This is a public forum