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.

MSPM0G1505: Unexpected error when configuring comparator using SysConfig

Part Number: MSPM0G1505
Other Parts Discussed in Thread: MSPM0L1303, SYSCONFIG

Tool/software:

I am migrating a project from MSPM0L1303 to MSPM0G1505. 

When I am recreating the configuration using SysConfig I get an error as soon as I select "Channel input enabled for the positive terminal" for the comparator (COMP0).

TypeError: Cannot read properties of undefined (reading 'match')
    at getGPIOPort (/home/marne/Downloads/mspm0_sdk_1_30_00_03/source/ti/driverlib/.meta/Common.js:1812:25)
    at Object.getGPIOPortMultiPad (/home/marne/Downloads/mspm0_sdk_1_30_00_03/source/ti/driverlib/.meta/Common.js:1829:12)
    at printDefine (/home/marne/Downloads/mspm0_sdk_1_30_00_03/source/ti/driverlib/.meta/comp/COMP.Board.h.xdt:180:37)
    at subTemplateFunction (/home/marne/Downloads/mspm0_sdk_1_30_00_03/source/ti/driverlib/.meta/comp/COMP.Board.h.xdt:54:13)
    at webpack://sysconfig/src/pinmux/services/metaEnvironment/runtimeContext.ts:1102:11
    at templateFunc (/home/marne/Downloads/mspm0_sdk_1_30_00_03/source/ti/driverlib/.meta/templates/Board.h.xdt:50:10)
    at func (webpack://sysconfig/src/pinmux/services/codeGeneration/templateRunner.ts:29:39)
    at allowPathVisibility (webpack://sysconfig/src/pinmux/services/pathsVisibility.ts:11:10)
    at runTemplate (webpack://sysconfig/src/pinmux/services/codeGeneration/templateRunner.ts:29:13)
    at t.CodeGenerator.generate (webpack://sysconfig/src/pinmux/services/codeGeneration/codeGenerator.ts:136:10)

I have tried both SysConfig 1.23.0 and 1.24.0 (latest as of writing).

I have attached the syscfg-file.

  • /**
     * 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 "MSPM0G150X" --part "Default" --package "VQFN-24(RGE)" --product "mspm0_sdk@1.30.00.03"
     * @v2CliArgs --device "MSPM0G1505" --package "VQFN-24(RGE)" --product "mspm0_sdk@1.30.00.03"
     * @versions {"tool":"1.24.0+4150"}
     */
    
    /**
     * 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 COMP          = scripting.addModule("/ti/driverlib/COMP", {}, false);
    const COMP1         = COMP.addInstance();
    const GPIO          = scripting.addModule("/ti/driverlib/GPIO", {}, false);
    const GPIO1         = GPIO.addInstance();
    const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
    
    /**
     * Write custom configuration values to the imported modules.
     */
    ADC121.$name                 = "ADC";
    ADC121.samplingOperationMode = "sequence";
    ADC121.endAdd                = 1;
    ADC121.adcMem0_name          = "VBUS";
    ADC121.adcMem0vref           = "VREF";
    ADC121.adcMem0chansel        = "DL_ADC12_INPUT_CHAN_3";
    ADC121.adcMem1_name          = "Current";
    ADC121.adcMem1chansel        = "DL_ADC12_INPUT_CHAN_13";
    ADC121.adcMem1vref           = "VREF";
    ADC121.adcPin3Config.$name   = "ti_driverlib_gpio_GPIOPinGeneric2";
    
    Board.configureUnused  = true;
    Board.unusedDirection  = "INPUT";
    Board.genPeriphPinFile = true;
    Board.genFileMod.$name = "ti_driverlib_BoardPins0";
    
    COMP1.$name                   = "OCP_COMP";
    COMP1.polarity                = "DL_COMP_POLARITY_INV";
    COMP1.hysteresis              = "DL_COMP_HYSTERESIS_30";
    COMP1.terminalSelect          = "DL_COMP_REF_TERMINAL_SELECT_NEG";
    COMP1.controlSelect           = "DL_COMP_DAC_CONTROL_SW";
    COMP1.setDACCode0             = 0x6D;
    COMP1.vSource                 = "DL_COMP_REF_SOURCE_VREF_DAC";
    COMP1.enabledInterrupts       = ["DL_COMP_INTERRUPT_OUTPUT_READY"];
    COMP1.channelEnable           = ["POS"];
    COMP1.peripheral.$assign      = "COMP0";
    COMP1.compPinPos0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
    
    GPIO1.$name                         = "GPIO_GRP_0";
    GPIO1.associatedPins.create(2);
    GPIO1.associatedPins[0].$name       = "CCCV";
    GPIO1.associatedPins[0].pin.$assign = "PA21";
    GPIO1.associatedPins[1].$name       = "OCP";
    GPIO1.associatedPins[1].pin.$assign = "PA15";
    
    const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL", {}, false);
    
    const VREF                  = scripting.addModule("/ti/driverlib/VREF", {}, false);
    VREF.vrefPosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
    
    ProjectConfig.deviceSpin = "MSPM0G1505";
    
    /**
     * 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            = "ADC1";
    ADC121.peripheral.adcPin3.$suggestSolution    = "PA18";
    Board.peripheral.$suggestSolution             = "DEBUGSS";
    Board.peripheral.swclkPin.$suggestSolution    = "PA20";
    Board.peripheral.swdioPin.$suggestSolution    = "PA19";
    COMP1.peripheral.compPinPos0.$suggestSolution = "PA26";
    SYSCTL.peripheral.$suggestSolution            = "SYSCTL";
    VREF.peripheral.$suggestSolution              = "VREF";
    VREF.peripheral.vrefPosPin.$suggestSolution   = "PA23";

  • Hey Michael,

    I tried setting up your syscfg file and didn't run into any issues while selecting "Channel input enabled for the positive terminal" or while building it. Are you selecting these options in a new MSPM0G1505 project or adjusting them in the pre-existing MSPM0L1303 project?

    Best,

    Daniel

  • Hey Michael, do you still need help with this issue?