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.

MSPM0C1104:Add ADC settings for thermal sensor but not working

Part Number: MSPM0C1104

Tool/software:

According to the example of 'adc12_single_conversion', I add ADC settings (PA27) into my project. 

But I can't receive any ADC12_0_INST_IRQHandler event, so I can't get any data from thermal sensor.

int main(void) {

    /* Get calibrated ADC offset - workaround for ADC_ERR_06 */
    gADCOffset = DL_ADC12_getADCOffsetCalibration(ADC12_0_ADCMEM_0_REF_VOLTAGE_V);
    NVIC_EnableIRQ(ADC12_0_INST_INT_IRQN);
    gCheckADC = false;

    ...
}


void ADC12_0_INST_IRQHandler(void) {
    switch (DL_ADC12_getPendingInterrupt(ADC12_0_INST)) {
        case DL_ADC12_IIDX_MEM0_RESULT_LOADED:
        gCheckADC = true;
        break;
    default:
        break;
    }
}

I try to change the syscfg, but still not working, Could you help me to resolve this problem? Thank you.

(I can't upload my .syscfg, so I paste the content here.)

/**
 * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
 * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
 * @cliArgs --device "MSPM0C110X" --part "Default" --package "WQFN-20(RUK)" --product "mspm0_sdk@2.02.00.05"
 * @v2CliArgs --device "MSPM0C1104" --package "WQFN-20(RUK)" --product "mspm0_sdk@2.02.00.05"
 * @versions {"tool":"1.22.0+3893"}
 */

/**
 * Import the modules used in this configuration.
 */
const ADC12  = scripting.addModule("/ti/driverlib/ADC12", {}, false);
const ADC121 = ADC12.addInstance();
const Board  = scripting.addModule("/ti/driverlib/Board");
const GPIO   = scripting.addModule("/ti/driverlib/GPIO", {}, false);
const GPIO1  = GPIO.addInstance();
const GPIO2  = GPIO.addInstance();
const I2C    = scripting.addModule("/ti/driverlib/I2C", {}, false);
const I2C1   = I2C.addInstance();
const PWM    = scripting.addModule("/ti/driverlib/PWM", {}, false);
const PWM1   = PWM.addInstance();
const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
const VREF   = scripting.addModule("/ti/driverlib/VREF");

/**
 * Write custom configuration values to the imported modules.
 */
ADC121.$name               = "ADC12_0";
ADC121.sampClkSrc          = "DL_ADC12_CLOCK_ULPCLK";
ADC121.sampClkDiv          = "DL_ADC12_CLOCK_DIVIDE_8";
ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric4";

Board.peripheral.$assign          = "DEBUGSS";
Board.peripheral.swclkPin.$assign = "PA20";
Board.peripheral.swdioPin.$assign = "PA19";

GPIO1.$name                          = "GPIO_LEDS";
GPIO1.associatedPins.create(2);
GPIO1.associatedPins[0].$name        = "USER_LED_1";
GPIO1.associatedPins[0].initialValue = "SET";
GPIO1.associatedPins[0].assignedPin  = "22";
GPIO1.associatedPins[1].assignedPort = "PORTA";
GPIO1.associatedPins[1].$name        = "USER_ERROR";
GPIO1.associatedPins[1].assignedPin  = "17";
GPIO1.associatedPins[1].pin.$assign  = "PA17";

GPIO2.$name                         = "I2C_IRQ";
GPIO2.associatedPins[0].$name       = "PIN_0";
GPIO2.associatedPins[0].direction   = "INPUT";
GPIO2.associatedPins[0].interruptEn = true;
GPIO2.associatedPins[0].polarity    = "FALL";
GPIO2.associatedPins[0].pin.$assign = "PA16";

I2C1.$name                             = "I2C";
I2C1.basicEnableController             = true;
I2C1.advControllerTXFIFOTRIG           = "BYTES_1";
I2C1.advAnalogGlitchFilter             = "DISABLED";
I2C1.intController                     = ["NACK","RXFIFO_TRIGGER","RX_DONE","TX_DONE"];
I2C1.peripheral.$assign                = "I2C0";
I2C1.peripheral.sdaPin.$assign         = "PA0";
I2C1.peripheral.sclPin.$assign         = "PA11";
I2C1.sdaPinConfig.hideOutputInversion  = scripting.forceWrite(false);
I2C1.sdaPinConfig.onlyInternalResistor = scripting.forceWrite(false);
I2C1.sdaPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
I2C1.sdaPinConfig.$name                = "ti_driverlib_gpio_GPIOPinGeneric0";
I2C1.sclPinConfig.hideOutputInversion  = scripting.forceWrite(false);
I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
I2C1.sclPinConfig.$name                = "ti_driverlib_gpio_GPIOPinGeneric1";

PWM1.$name                      = "PWM_0";
PWM1.clockPrescale              = 256;
PWM1.peripheral.$assign         = "TIMG14";
PWM1.peripheral.ccp0Pin.$assign = "PA23";
PWM1.peripheral.ccp1Pin.$assign = "PA24";
PWM1.PWM_CHANNEL_0.$name        = "ti_driverlib_pwm_PWMTimerCC0";
PWM1.PWM_CHANNEL_1.$name        = "ti_driverlib_pwm_PWMTimerCC1";
PWM1.ccp0PinConfig.$name        = "ti_driverlib_gpio_GPIOPinGeneric2";
PWM1.ccp1PinConfig.$name        = "ti_driverlib_gpio_GPIOPinGeneric3";

SYSCTL.clockTreeEn = true;

VREF.profile = "INT_1_4_V";

const ProjectConfig              = scripting.addModule("/ti/project_config/ProjectConfig", {}, false);
ProjectConfig.migrationCondition = true;

/**
 * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
 * version of the tool will not impact the pinmux you originally saw.  These lines can be completely deleted in order to
 * re-solve from scratch.
 */
ADC121.peripheral.$suggestSolution           = "ADC0";
ADC121.peripheral.adcPin0.$suggestSolution   = "PA27";
GPIO1.associatedPins[0].pin.$suggestSolution = "PA22";