2025-11-10 18:05:11 +08:00
|
|
|
/**
|
|
|
|
|
* 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.
|
2026-07-17 15:18:46 +08:00
|
|
|
* @cliArgs --device "MSPM0G350X" --part "Default" --package "VQFN-32(RHB)" --product "mspm0_sdk@2.07.00.05"
|
|
|
|
|
* @v2CliArgs --device "MSPM0G3507" --package "VQFN-32(RHB)" --product "mspm0_sdk@2.07.00.05"
|
2025-11-10 18:05:11 +08:00
|
|
|
* @versions {"tool":"1.25.0+4268"}
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Import the modules used in this configuration.
|
|
|
|
|
*/
|
2025-11-12 21:26:40 +08:00
|
|
|
const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
|
|
|
|
|
const GPIO1 = GPIO.addInstance();
|
2026-07-17 15:18:46 +08:00
|
|
|
const GPIO2 = GPIO.addInstance();
|
2025-11-12 21:26:40 +08:00
|
|
|
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
|
|
|
|
|
const I2C1 = I2C.addInstance();
|
2026-07-17 15:18:46 +08:00
|
|
|
const MATHACL = scripting.addModule("/ti/driverlib/MATHACL");
|
|
|
|
|
const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
|
|
|
|
|
const MCAN1 = MCAN.addInstance();
|
2025-11-12 21:26:40 +08:00
|
|
|
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");
|
2025-11-17 10:13:18 +08:00
|
|
|
const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
|
|
|
|
|
const TIMER1 = TIMER.addInstance();
|
2025-11-10 18:05:11 +08:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Write custom configuration values to the imported modules.
|
|
|
|
|
*/
|
2025-11-12 21:38:23 +08:00
|
|
|
const divider7 = system.clockTree["PLL_PDIV"];
|
|
|
|
|
divider7.divideValue = 2;
|
|
|
|
|
|
|
|
|
|
const divider9 = system.clockTree["UDIV"];
|
|
|
|
|
divider9.divideValue = 2;
|
|
|
|
|
|
2025-11-10 18:05:11 +08:00
|
|
|
const gate7 = system.clockTree["MFCLKGATE"];
|
|
|
|
|
gate7.enable = true;
|
|
|
|
|
|
2025-11-12 21:38:23 +08:00
|
|
|
const multiplier2 = system.clockTree["PLL_QDIV"];
|
|
|
|
|
multiplier2.multiplyValue = 4;
|
|
|
|
|
|
2026-07-17 15:18:46 +08:00
|
|
|
const mux2 = system.clockTree["CANCLKMUX"];
|
|
|
|
|
mux2.inputSelect = "CANCLKMUX_PLLCLK1_OUT";
|
|
|
|
|
|
2025-11-12 21:38:23 +08:00
|
|
|
const mux4 = system.clockTree["EXHFMUX"];
|
|
|
|
|
mux4.inputSelect = "EXHFMUX_XTAL";
|
|
|
|
|
|
|
|
|
|
const mux8 = system.clockTree["HSCLKMUX"];
|
|
|
|
|
mux8.inputSelect = "HSCLKMUX_SYSPLL2X";
|
|
|
|
|
|
|
|
|
|
const mux12 = system.clockTree["SYSPLLMUX"];
|
|
|
|
|
mux12.inputSelect = "zSYSPLLMUX_HFCLK";
|
|
|
|
|
|
2026-07-17 15:18:46 +08:00
|
|
|
const pinFunction4 = system.clockTree["HFXT"];
|
|
|
|
|
pinFunction4.enable = true;
|
|
|
|
|
pinFunction4.inputFreq = 40;
|
|
|
|
|
pinFunction4.peripheral.$assign = "SYSCTL";
|
|
|
|
|
pinFunction4.peripheral.hfxInPin.$assign = "PA5";
|
|
|
|
|
pinFunction4.peripheral.hfxOutPin.$assign = "PA6";
|
2025-11-12 21:38:23 +08:00
|
|
|
|
2026-07-17 15:18:46 +08:00
|
|
|
GPIO1.$name = "GPIO_GRP_0";
|
|
|
|
|
GPIO1.port = "PORTA";
|
|
|
|
|
GPIO1.associatedPins[0].$name = "PIN_0";
|
|
|
|
|
GPIO1.associatedPins[0].direction = "INPUT";
|
|
|
|
|
GPIO1.associatedPins[0].pin.$assign = "PA14";
|
2025-11-10 18:05:11 +08:00
|
|
|
|
|
|
|
|
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
|
|
|
|
|
Board.peripheral.$assign = "DEBUGSS";
|
|
|
|
|
Board.peripheral.swclkPin.$assign = "PA20";
|
|
|
|
|
Board.peripheral.swdioPin.$assign = "PA19";
|
|
|
|
|
|
2026-07-17 15:18:46 +08:00
|
|
|
GPIO2.$name = "GPIO_GRP_1";
|
|
|
|
|
GPIO2.port = "PORTA";
|
|
|
|
|
GPIO2.associatedPins[0].$name = "PIN_1";
|
|
|
|
|
GPIO2.associatedPins[0].direction = "INPUT";
|
|
|
|
|
GPIO2.associatedPins[0].pin.$assign = "PA15";
|
|
|
|
|
|
2025-11-10 18:05:11 +08:00
|
|
|
I2C1.$name = "I2C_1";
|
|
|
|
|
I2C1.advAnalogGlitchFilter = "DISABLED";
|
|
|
|
|
I2C1.basicEnableController = true;
|
2026-07-17 15:18:46 +08:00
|
|
|
I2C1.peripheral.$assign = "I2C1";
|
|
|
|
|
I2C1.peripheral.sdaPin.$assign = "PA16";
|
|
|
|
|
I2C1.peripheral.sclPin.$assign = "PA17";
|
2025-11-10 18:05:11 +08:00
|
|
|
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.sclPinConfig.hideOutputInversion = scripting.forceWrite(false);
|
|
|
|
|
I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
|
|
|
|
|
I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
|
|
|
|
|
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
|
|
|
|
|
|
2026-07-17 15:18:46 +08:00
|
|
|
MCAN1.$name = "MCAN0";
|
|
|
|
|
MCAN1.peripheral.$assign = "CANFD0";
|
|
|
|
|
MCAN1.peripheral.rxPin.$assign = "PA27";
|
|
|
|
|
MCAN1.peripheral.txPin.$assign = "PA26";
|
|
|
|
|
MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
|
|
|
|
|
MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric8";
|
|
|
|
|
|
2025-11-12 10:32:45 +08:00
|
|
|
PWM1.$name = "PWM_0";
|
|
|
|
|
PWM1.ccIndex = [0,1,2];
|
|
|
|
|
PWM1.clockDivider = 2;
|
|
|
|
|
PWM1.timerCount = 2000;
|
|
|
|
|
PWM1.pwmMode = "CENTER_ALIGN";
|
|
|
|
|
PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
|
|
|
|
|
PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC1";
|
|
|
|
|
PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
|
|
|
|
|
PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
|
|
|
|
|
PWM1.peripheral.$assign = "TIMA0";
|
2026-07-17 15:18:46 +08:00
|
|
|
PWM1.peripheral.ccp0Pin.$assign = "PA8";
|
|
|
|
|
PWM1.peripheral.ccp1Pin.$assign = "PA9";
|
|
|
|
|
PWM1.peripheral.ccp2Pin.$assign = "PA10";
|
2025-11-12 10:32:45 +08:00
|
|
|
PWM1.PWM_CHANNEL_2.$name = "ti_driverlib_pwm_PWMTimerCC2";
|
|
|
|
|
PWM1.ccp2PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
|
|
|
|
|
|
2025-11-10 18:05:11 +08:00
|
|
|
SYSCTL.forceDefaultClkConfig = true;
|
2026-07-17 15:18:46 +08:00
|
|
|
SYSCTL.clockTreeEn = true;
|
2025-11-10 18:05:11 +08:00
|
|
|
|
2025-11-12 21:26:40 +08:00
|
|
|
SYSTICK.periodEnable = true;
|
|
|
|
|
SYSTICK.systickEnable = true;
|
|
|
|
|
SYSTICK.period = 16000000;
|
|
|
|
|
|
2025-11-17 10:13:18 +08:00
|
|
|
TIMER1.$name = "TIMER_0";
|
|
|
|
|
TIMER1.timerClkDiv = 8;
|
|
|
|
|
TIMER1.timerMode = "PERIODIC";
|
|
|
|
|
TIMER1.timerClkPrescale = 8;
|
|
|
|
|
TIMER1.interrupts = ["ZERO"];
|
|
|
|
|
TIMER1.timerClkSrc = "LFCLK";
|
|
|
|
|
TIMER1.timerPeriod = "1";
|
|
|
|
|
TIMER1.peripheral.$assign = "TIMG0";
|
|
|
|
|
|
2025-11-10 18:05:11 +08:00
|
|
|
const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig", {}, false);
|
|
|
|
|
ProjectConfig.migrationCondition = true;
|