/** * 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 "MSPM0L130X" --part "Default" --package "VSSOP-20(DGS20)" --product "mspm0_sdk@2.05.00.05" * @v2CliArgs --device "MSPM0L1304" --package "VSSOP-20(DGS20)" --product "mspm0_sdk@2.05.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 COMP = scripting.addModule("/ti/driverlib/COMP", {}, false); const COMP1 = COMP.addInstance(); const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false); const GPIO1 = GPIO.addInstance(); const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false); const I2C1 = I2C.addInstance(); const OPA = scripting.addModule("/ti/driverlib/OPA", {}, false); const OPA1 = OPA.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"); const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig"); /** * Write custom configuration values to the imported modules. */ ADC121.$name = "ADC12_0"; ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED"]; ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8"; ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL"; ADC121.sampleTime0 = "125 us"; ADC121.adcMem0avgen = true; ADC121.hwNumerator = "DL_ADC12_HW_AVG_NUM_ACC_32"; ADC121.hwDenominator = "DL_ADC12_HW_AVG_DEN_DIV_BY_32"; ADC121.adcMem1vref = "VREF"; ADC121.peripheral.$assign = "ADC0"; ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric4"; Board.configureVDDA = true; Board.peripheral.$assign = "DEBUGSS"; Board.peripheral.swclkPin.$assign = "PA20"; Board.peripheral.swdioPin.$assign = "PA19"; COMP1.$name = "COMP_0"; COMP1.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC"; COMP1.controlSelect = "DL_COMP_DAC_CONTROL_SW"; COMP1.hysteresis = "DL_COMP_HYSTERESIS_10"; COMP1.terminalSelect = "DL_COMP_REF_TERMINAL_SELECT_NEG"; GPIO1.$name = "ADDR"; GPIO1.associatedPins.create(3); GPIO1.associatedPins[0].$name = "A0"; GPIO1.associatedPins[0].direction = "INPUT"; GPIO1.associatedPins[0].polarity = "RISE_FALL"; GPIO1.associatedPins[0].interruptEn = true; GPIO1.associatedPins[0].pin.$assign = "PA4"; GPIO1.associatedPins[1].$name = "A1"; GPIO1.associatedPins[1].direction = "INPUT"; GPIO1.associatedPins[1].interruptEn = true; GPIO1.associatedPins[1].polarity = "RISE_FALL"; GPIO1.associatedPins[1].pin.$assign = "PA11"; GPIO1.associatedPins[2].$name = "A2"; GPIO1.associatedPins[2].direction = "INPUT"; GPIO1.associatedPins[2].pin.$assign = "PA16"; I2C1.$name = "I2C_target"; I2C1.basicEnableTarget = true; I2C1.intTarget = ["RXFIFO_TRIGGER","START","STOP","TXFIFO_TRIGGER"]; I2C1.basicTargetAddress = 0x48; I2C1.enableTimeoutA = true; I2C1.timeoutACount = 125; I2C1.enableTimeoutB = true; I2C1.timeoutBCount = 125; I2C1.intGeneric = ["TIMEOUT_A","TIMEOUT_B"]; I2C1.peripheral.$assign = "I2C0"; I2C1.peripheral.sdaPin.$assign = "PA0"; I2C1.peripheral.sclPin.$assign = "PA1/NRST"; I2C1.sdaPinConfig.hideOutputInversion = scripting.forceWrite(false); I2C1.sdaPinConfig.onlyInternalResistor = scripting.forceWrite(false); I2C1.sdaPinConfig.passedPeripheralType = scripting.forceWrite("Digital"); I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2"; I2C1.sdaPinConfig.enableConfig = true; I2C1.sclPinConfig.hideOutputInversion = scripting.forceWrite(false); I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false); I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital"); I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3"; I2C1.sclPinConfig.enableConfig = true; OPA1.$name = "OPA_0"; OPA1.cfg0OutputPin = "ENABLED"; OPA1.cfg0PSELChannel = "DAC8_OUT"; OPA1.cfg0NSELChannel = "RTOP"; OPA1.peripheral.$assign = "OPA0"; OPA1.peripheral.OutPin.$assign = "PA22"; OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0"; PWM1.$name = "PWM"; PWM1.ccIndex = [1]; PWM1.timerCount = 320; PWM1.peripheral.$assign = "TIMG0"; PWM1.peripheral.ccp1Pin.$assign = "PA6"; PWM1.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT"); PWM1.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false); PWM1.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false); PWM1.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital"); PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1"; PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC0"; PWM1.PWM_CHANNEL_1.invert = true; SYSCTL.disableNRSTPin = true; SYSCTL.peripheral.$assign = "SYSCTL"; VREF.basicIntVolt = "DL_VREF_BUFCONFIG_OUTPUT_2_5V"; ProjectConfig.migrationCondition = true; ProjectConfig.genLibIQ = 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.adcPin0.$suggestSolution = "PA27"; COMP1.peripheral.$suggestSolution = "COMP0"; VREF.peripheral.$suggestSolution = "VREF";