/** * 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" --package "VSSOP-20(DGS20)" --part "Default" --product "mspm0_sdk@1.10.00.05" * @versions {"tool":"1.17.0+3128"} */ /** * 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 PWM = scripting.addModule("/ti/driverlib/PWM", {}, false); const PWM1 = PWM.addInstance(); const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL"); const SYSTICK = scripting.addModule("/ti/driverlib/SYSTICK"); const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false); const TIMER1 = TIMER.addInstance(); const UART = scripting.addModule("/ti/driverlib/UART", {}, false); const UART1 = UART.addInstance(); /** * Write custom configuration values to the imported modules. */ const gate6 = system.clockTree["MFCLKGATE"]; gate6.enable = true; ADC121.$name = "ADC12_0"; ADC121.samplingOperationMode = "sequence"; ADC121.endAdd = 3; ADC121.repeatMode = true; ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_1"; ADC121.adcMem2chansel = "DL_ADC12_INPUT_CHAN_2"; ADC121.adcMem3chansel = "DL_ADC12_INPUT_CHAN_3"; ADC121.adcMem0_name = "AI_VBAT_MON"; ADC121.adcMem1_name = "AI_MOTOR_P"; ADC121.adcMem2_name = "AI_MOTOR_N"; ADC121.adcMem3_name = "AI_MOTOR_I"; ADC121.sampClkSrc = "DL_ADC12_CLOCK_ULPCLK"; ADC121.peripheral.$assign = "ADC0"; ADC121.peripheral.adcPin0.$assign = "PA27"; ADC121.peripheral.adcPin1.$assign = "PA26"; ADC121.peripheral.adcPin2.$assign = "PA25"; ADC121.peripheral.adcPin3.$assign = "PA24/OPA0.IN0-"; ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0"; ADC121.adcPin1Config.$name = "ti_driverlib_gpio_GPIOPinGeneric5"; ADC121.adcPin2Config.$name = "ti_driverlib_gpio_GPIOPinGeneric6"; ADC121.adcPin3Config.$name = "ti_driverlib_gpio_GPIOPinGeneric7"; Board.genPeriphPinFile = true; Board.configureUnused = true; Board.peripheral.$assign = "DEBUGSS"; Board.peripheral.swclkPin.$assign = "PA20"; Board.peripheral.swdioPin.$assign = "PA19"; Board.genFileMod.$name = "ti_driverlib_BoardPins0"; GPIO1.$name = "GPIO_GRP_0"; GPIO1.associatedPins.create(6); GPIO1.associatedPins[0].$name = "DO_MOTOR_DIR"; GPIO1.associatedPins[0].pin.$assign = "PA6"; GPIO1.associatedPins[1].$name = "DO_MOTOR_EN"; GPIO1.associatedPins[1].pin.$assign = "PA22"; GPIO1.associatedPins[2].$name = "DI_ST_MOTOR"; GPIO1.associatedPins[2].direction = "INPUT"; GPIO1.associatedPins[2].pin.$assign = "PA2"; GPIO1.associatedPins[3].$name = "DI_SW_BWD"; GPIO1.associatedPins[3].direction = "INPUT"; GPIO1.associatedPins[3].pin.$assign = "PA0"; GPIO1.associatedPins[4].$name = "VBAT_SW_EN"; GPIO1.associatedPins[4].pin.$assign = "PA4"; GPIO1.associatedPins[5].$name = "VBAT_MON_EN"; GPIO1.associatedPins[5].pin.$assign = "PA23"; PWM1.ccIndex = [0]; PWM1.$name = "DO_PWM_MOTOR"; PWM1.clockDivider = 4; PWM1.timerCount = 400; PWM1.peripheral.ccp0Pin.$assign = "PA16"; PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0"; 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.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3"; SYSCTL.powerPolicy = "STANDBY1"; SYSCTL.clockTreeEn = true; SYSTICK.periodEnable = true; SYSTICK.period = 32000; SYSTICK.systickEnable = true; TIMER1.interrupts = ["ZERO"]; TIMER1.timerClkSrc = "LFCLK"; TIMER1.timerPeriod = "10 ms"; TIMER1.$name = "TIMER_WU"; UART1.$name = "UART_0"; UART1.targetBaudRate = 115200; UART1.peripheral.$assign = "UART0"; UART1.peripheral.rxPin.$assign = "PA18"; UART1.peripheral.txPin.$assign = "PA17/OPA1.IN0-"; UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1"; UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2"; /** * 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. */ PWM1.peripheral.$suggestSolution = "TIMG0"; TIMER1.peripheral.$suggestSolution = "TIMG1";