/** * 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 "MSPM0L110X" --part "Default" --package "VQFN-32(RHB)" --product "mspm0_sdk@2.10.00.04" * @v2CliArgs --device "MSPM0L1106" --package "VQFN-32(RHB)" --product "mspm0_sdk@2.10.00.04" * @versions {"tool":"1.26.2+4477"} */ /** * 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 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 TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false); const TIMER1 = TIMER.addInstance(); const TIMER2 = TIMER.addInstance(); const UART = scripting.addModule("/ti/driverlib/UART", {}, false); const UART1 = UART.addInstance(); 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.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL"; ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_2"; ADC121.sampleTime0 = "12us"; ADC121.adcMem0vref = "VREF"; ADC121.adcMem0avgen = true; ADC121.adcMem1vref = "VREF"; ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_8"; ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED","DL_ADC12_INTERRUPT_MEM1_RESULT_LOADED"]; ADC121.enableHWAverage = false; ADC121.startAdd = 1; ADC121.enabledADCMems = [0,1]; ADC121.adcPin8Config.$name = "ti_driverlib_gpio_GPIOPinGeneric6"; ADC121.peripheral.$assign = "ADC0"; ADC121.peripheral.adcPin2.$assign = "PA25"; ADC121.peripheral.adcPin8.$assign = "PA16"; ADC121.adcPin2Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0"; Board.peripheral.$assign = "DEBUGSS"; Board.peripheral.swclkPin.$assign = "PA20"; Board.peripheral.swdioPin.$assign = "PA19"; GPIO1.$name = "GPIO_LEDS"; GPIO1.port = "PORTA"; GPIO1.associatedPins.create(4); GPIO1.associatedPins[0].$name = "USER_LED_1"; GPIO1.associatedPins[0].initialValue = "SET"; GPIO1.associatedPins[0].assignedPin = "26"; GPIO1.associatedPins[0].pin.$assign = "PA26"; GPIO1.associatedPins[1].assignedPin = "4"; GPIO1.associatedPins[1].$name = "LD1_LED2"; GPIO1.associatedPins[1].initialValue = "SET"; GPIO1.associatedPins[1].pin.$assign = "PA4"; GPIO1.associatedPins[2].$name = "LD1_LED1"; GPIO1.associatedPins[2].assignedPin = "1"; GPIO1.associatedPins[2].pin.$assign = "PA1"; GPIO1.associatedPins[3].$name = "RI_LED"; GPIO1.associatedPins[3].assignedPin = "5"; GPIO1.associatedPins[3].pin.$assign = "PA5"; I2C1.$name = "I2C_0"; I2C1.advAnalogGlitchFilter = "DISABLED"; I2C1.basicEnableController = true; I2C1.peripheral.$assign = "I2C0"; I2C1.peripheral.sdaPin.$assign = "PA10"; I2C1.peripheral.sclPin.$assign = "PA11"; I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4"; I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5"; PWM1.$name = "PWM_1"; PWM1.clockPrescale = 20; PWM1.ccIndex = [0]; PWM1.timerCount = 4000; PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0"; PWM1.PWM_CHANNEL_0.dutyCycle = 5; PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3"; PWM1.ccp0PinConfig.direction = scripting.forceWrite("OUTPUT"); PWM1.ccp0PinConfig.hideOutputInversion = scripting.forceWrite(false); PWM1.ccp0PinConfig.onlyInternalResistor = scripting.forceWrite(false); PWM1.ccp0PinConfig.passedPeripheralType = scripting.forceWrite("Digital"); PWM1.peripheral.$assign = "TIMG1"; PWM1.peripheral.ccp0Pin.$assign = "PA14"; SYSCTL.MFCLKEn = true; SYSCTL.MFPCLKEn = true; SYSCTL.powerPolicy = "STANDBY0"; SYSCTL.SYSOSC_Freq = 4000000; TIMER1.interrupts = ["ZERO"]; TIMER1.timerMode = "PERIODIC"; TIMER1.$name = "LP_PRE_Timer_TIMG4"; TIMER1.timerClkPrescale = 50; TIMER1.timerClkDiv = 2; TIMER1.timerPeriod = "500 ms"; TIMER1.peripheral.$assign = "TIMG4"; TIMER2.$name = "TIMER_0"; TIMER2.interrupts = ["ZERO"]; TIMER2.timerMode = "PERIODIC"; TIMER2.timerPeriod = "500 ms"; TIMER2.timerClkPrescale = 33; TIMER2.timerClkSrc = "LFCLK"; TIMER2.peripheral.$assign = "TIMG0"; UART1.$name = "UART_0"; UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1"; UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2"; VREF.basicIntVolt = "DL_VREF_BUFCONFIG_OUTPUT_2_5V"; VREF.peripheral.$assign = "VREF"; 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. */ SYSCTL.peripheral.$suggestSolution = "SYSCTL"; UART1.peripheral.$suggestSolution = "UART0"; UART1.peripheral.rxPin.$suggestSolution = "PA18"; UART1.peripheral.txPin.$suggestSolution = "PA17";