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:使用 SysConfig 配置比较器时出现意外错误

Guru**** 2376610 points
Other Parts Discussed in Thread: MSPM0G1505, MSPM0L1303, SYSCONFIG
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1532129/mspm0g1505-unexpected-error-when-configuring-comparator-using-sysconfig

器件型号:MSPM0G1505
Thread: MSPM0L1303SysConfig 中讨论的其他器件

工具/软件:

我将一个工程从 MSPM0L1303 迁移到 MSPM0G1505。  

当我使用 SysConfig 重新创建配置时、我为比较器 (COMP0) 选择“Channel Input enabled for the Positive Terminal“后就会收到错误。

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)

我已经尝试了 SysConfig 1.23.0 和 1.24.0(截至编写时的最新版本)。

我附加了 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";

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Michael、

    我尝试了设置您的 syscfg 文件、在选择“Channel input enabled for the posal termin“或构建它时没有遇到任何问题。 您是在新的 MSPM0G1505 工程中选择这些选项、还是在预先存在的 MSPM0L1303 工程中对它们进行调整?

    此致、

    Daniel

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    嗨、Michael、您是否仍需要帮助解决此问题?