/** * 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 "MSPM0G350X" --part "Default" --package "VSSOP-28(DGS28)" --product "mspm0_sdk@2.02.00.05" * @v2CliArgs --device "MSPM0G3507" --package "VSSOP-28(DGS28)" --product "mspm0_sdk@2.02.00.05" * @versions {"tool":"1.21.0+3721"} */ /** * Import the modules used in this configuration. */ const ADC12 = scripting.addModule("/ti/driverlib/ADC12", {}, false); const ADC121 = ADC12.addInstance(); const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false); const GPIO1 = GPIO.addInstance(); const GPIO2 = GPIO.addInstance(); const GPIO3 = GPIO.addInstance(); const GPIO4 = GPIO.addInstance(); const MATHACL = scripting.addModule("/ti/driverlib/MATHACL"); const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false); const MCAN1 = MCAN.addInstance(); const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL"); /** * Write custom configuration values to the imported modules. */ const multiplier2 = system.clockTree["PLL_QDIV"]; multiplier2.multiplyValue = 5; const mux2 = system.clockTree["CANCLKMUX"]; mux2.inputSelect = "CANCLKMUX_PLLCLK1_OUT"; const pinFunction3 = system.clockTree["HFCLKEXT"]; pinFunction3.inputFreq = 40; const pinFunction4 = system.clockTree["HFXT"]; pinFunction4.HFXTStartup = 10; pinFunction4.HFCLKMonitor = true; pinFunction4.inputFreq = 40; ADC121.$name = "ADC12_0"; ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_2"; ADC121.samplingOperationMode = "sequence"; ADC121.endAdd = 2; ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_3"; ADC121.adcMem2chansel = "DL_ADC12_INPUT_CHAN_7"; ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8"; ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM2_RESULT_LOADED"]; ADC121.peripheral.$assign = "ADC0"; ADC121.peripheral.adcPin2.$assign = "PA25"; ADC121.peripheral.adcPin3.$assign = "PA24"; ADC121.peripheral.adcPin7.$assign = "PA22"; ADC121.adcPin2Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0"; ADC121.adcPin3Config.$name = "ti_driverlib_gpio_GPIOPinGeneric2"; ADC121.adcPin7Config.$name = "ti_driverlib_gpio_GPIOPinGeneric1"; const Board = scripting.addModule("/ti/driverlib/Board", {}, false); Board.peripheral.$assign = "DEBUGSS"; Board.peripheral.swclkPin.$assign = "PA20"; Board.peripheral.swdioPin.$assign = "PA19"; GPIO1.$name = "GPIO_MULTIPLEXER_PIN_CONFIG"; GPIO1.associatedPins.create(5); GPIO1.associatedPins[0].$name = "PIN_E1"; GPIO1.associatedPins[0].pin.$assign = "PA9"; GPIO1.associatedPins[1].$name = "PIN_S0"; GPIO1.associatedPins[1].pin.$assign = "PA5"; GPIO1.associatedPins[2].$name = "PIN_S1"; GPIO1.associatedPins[2].pin.$assign = "PA4"; GPIO1.associatedPins[3].$name = "PIN_S2"; GPIO1.associatedPins[3].pin.$assign = "PA3"; GPIO1.associatedPins[4].$name = "PIN_E0"; GPIO1.associatedPins[4].pin.$assign = "PA6"; GPIO2.$name = "GPIO_SHIFT_REGISTER_PIN_CONFIG"; GPIO2.associatedPins.create(5); GPIO2.associatedPins[0].$name = "PIN_SER"; GPIO2.associatedPins[0].pin.$assign = "PA11"; GPIO2.associatedPins[1].$name = "PIN_OE"; GPIO2.associatedPins[1].pin.$assign = "PA14"; GPIO2.associatedPins[2].$name = "PIN_RCLK"; GPIO2.associatedPins[2].pin.$assign = "PA15"; GPIO2.associatedPins[3].$name = "PIN_SRCLK"; GPIO2.associatedPins[3].pin.$assign = "PA16"; GPIO2.associatedPins[4].$name = "PIN_SRCLR"; GPIO2.associatedPins[4].pin.$assign = "PA17"; GPIO3.$name = "GPIO_BRIDGE_SEGMENT"; GPIO3.associatedPins[0].$name = "PIN_BRIDGE_SEGMENT"; GPIO3.associatedPins[0].pin.$assign = "PA10"; GPIO4.$name = "GPIO_PIN_FOR_CAN_COMMUNICATION"; GPIO4.associatedPins.create(2); GPIO4.associatedPins[0].direction = "INPUT"; GPIO4.associatedPins[0].$name = "PIN_DISCOVERY_IN"; GPIO4.associatedPins[0].pin.$assign = "PA0"; GPIO4.associatedPins[1].$name = "PIN_DISCOVERY_OUT"; GPIO4.associatedPins[1].pin.$assign = "PA1"; MCAN1.$name = "MCAN0"; MCAN1.wkupReqEnable = true; MCAN1.autoWkupEnable = true; MCAN1.emulationEnable = true; MCAN1.additionalCoreConfig = true; MCAN1.rrfe = true; MCAN1.rrfs = true; MCAN1.anfe = "1"; MCAN1.anfs = "1"; MCAN1.overrideRetention = true; MCAN1.enableInterrupt = true; MCAN1.interruptFlags = ["DL_MCAN_INTERRUPT_ARA","DL_MCAN_INTERRUPT_BEU","DL_MCAN_INTERRUPT_BO","DL_MCAN_INTERRUPT_DRX","DL_MCAN_INTERRUPT_ELO","DL_MCAN_INTERRUPT_EP","DL_MCAN_INTERRUPT_EW","DL_MCAN_INTERRUPT_MRAF","DL_MCAN_INTERRUPT_PEA","DL_MCAN_INTERRUPT_PED","DL_MCAN_INTERRUPT_RF0N","DL_MCAN_INTERRUPT_TC","DL_MCAN_INTERRUPT_TEFN","DL_MCAN_INTERRUPT_TOO","DL_MCAN_INTERRUPT_TSW","DL_MCAN_INTERRUPT_WDI"]; MCAN1.interruptLine = ["DL_MCAN_INTR_LINE_NUM_1"]; MCAN1.interruptLine1Flag = ["DL_MCAN_INTR_MASK_ALL"]; MCAN1.m0interrupts = ["DL_MCAN_MSP_INTERRUPT_LINE1"]; MCAN1.lss = 2; MCAN1.stdFiltElem = "001"; MCAN1.stdFiltType = "01"; MCAN1.stdFiltID1 = 3; MCAN1.stdFiltID2 = 4; MCAN1.flesa = 0; MCAN1.lse = 0; MCAN1.txEventFIFOWaterMark = 0; MCAN1.rxFIFO0waterMark = 0; MCAN1.rxBufElemSize = "DL_MCAN_ELEM_SIZE_32BYTES"; MCAN1.rxFIFO0ElemSize = "DL_MCAN_ELEM_SIZE_32BYTES"; MCAN1.rxFIFO1ElemSize = "DL_MCAN_ELEM_SIZE_32BYTES"; MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3"; MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4"; SYSCTL.CANCLKSource = "HFCLK"; SYSCTL.HFCLKSource = "HFXT"; SYSCTL.HFCLK_Freq = 48000000; SYSCTL.HFCLKMonitor = true; SYSCTL.HFXTStartup = 10; SYSCTL.forceDefaultClkConfig = true; SYSCTL.clockTreeEn = true; 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. */ MCAN1.peripheral.$suggestSolution = "CANFD0"; MCAN1.peripheral.rxPin.$suggestSolution = "PA27"; MCAN1.peripheral.txPin.$suggestSolution = "PA26";