change to 32pin g3507; can added

This commit is contained in:
2026-07-17 15:18:46 +08:00
parent 39cc590260
commit faefd36f8b
2 changed files with 336 additions and 81 deletions

View File

@@ -1,8 +1,8 @@
/**
* 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 "LQFP-48(PT)" --product "mspm0_sdk@2.07.00.05"
* @v2CliArgs --device "MSPM0G3507" --package "LQFP-48(PT)" --product "mspm0_sdk@2.07.00.05"
* @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"
* @versions {"tool":"1.25.0+4268"}
*/
@@ -11,16 +11,18 @@
*/
const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
const GPIO1 = GPIO.addInstance();
const GPIO2 = GPIO.addInstance();
const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
const I2C1 = I2C.addInstance();
const MATHACL = scripting.addModule("/ti/driverlib/MATHACL");
const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
const MCAN1 = MCAN.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.
@@ -37,6 +39,9 @@ gate7.enable = true;
const multiplier2 = system.clockTree["PLL_QDIV"];
multiplier2.multiplyValue = 4;
const mux2 = system.clockTree["CANCLKMUX"];
mux2.inputSelect = "CANCLKMUX_PLLCLK1_OUT";
const mux4 = system.clockTree["EXHFMUX"];
mux4.inputSelect = "EXHFMUX_XTAL";
@@ -46,24 +51,36 @@ mux8.inputSelect = "HSCLKMUX_SYSPLL2X";
const mux12 = system.clockTree["SYSPLLMUX"];
mux12.inputSelect = "zSYSPLLMUX_HFCLK";
const pinFunction4 = system.clockTree["HFXT"];
pinFunction4.enable = true;
pinFunction4.inputFreq = 40;
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";
GPIO1.$name = "LED";
GPIO1.associatedPins[0].$name = "PA0";
GPIO1.associatedPins[0].pin.$assign = "PA0";
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";
const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
Board.peripheral.$assign = "DEBUGSS";
Board.peripheral.swclkPin.$assign = "PA20";
Board.peripheral.swdioPin.$assign = "PA19";
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";
I2C1.$name = "I2C_1";
I2C1.advAnalogGlitchFilter = "DISABLED";
I2C1.basicEnableController = true;
I2C1.peripheral.sdaPin.$assign = "PB3";
I2C1.peripheral.sclPin.$assign = "PB2";
I2C1.peripheral.$assign = "I2C1";
I2C1.peripheral.sdaPin.$assign = "PA16";
I2C1.peripheral.sclPin.$assign = "PA17";
I2C1.sdaPinConfig.hideOutputInversion = scripting.forceWrite(false);
I2C1.sdaPinConfig.onlyInternalResistor = scripting.forceWrite(false);
I2C1.sdaPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
@@ -73,6 +90,13 @@ I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
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";
PWM1.$name = "PWM_0";
PWM1.ccIndex = [0,1,2];
PWM1.clockDivider = 2;
@@ -83,14 +107,14 @@ 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";
PWM1.peripheral.ccp0Pin.$assign = "PA21";
PWM1.peripheral.ccp1Pin.$assign = "PA22";
PWM1.peripheral.ccp2Pin.$assign = "PB20";
PWM1.peripheral.ccp0Pin.$assign = "PA8";
PWM1.peripheral.ccp1Pin.$assign = "PA9";
PWM1.peripheral.ccp2Pin.$assign = "PA10";
PWM1.PWM_CHANNEL_2.$name = "ti_driverlib_pwm_PWMTimerCC2";
PWM1.ccp2PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
SYSCTL.forceDefaultClkConfig = true;
SYSCTL.peripheral.$assign = "SYSCTL";
SYSCTL.clockTreeEn = true;
SYSTICK.periodEnable = true;
SYSTICK.systickEnable = true;
@@ -105,41 +129,5 @@ TIMER1.timerClkSrc = "LFCLK";
TIMER1.timerPeriod = "1";
TIMER1.peripheral.$assign = "TIMG0";
UART1.$name = "UART_0";
UART1.rxFifoThreshold = "DL_UART_RX_FIFO_LEVEL_ONE_ENTRY";
UART1.targetBaudRate = 115200;
UART1.uartClkDiv = "8";
UART1.enableFIFO = true;
UART1.txFifoThreshold = "DL_UART_TX_FIFO_LEVEL_ONE_ENTRY";
UART1.enabledDMATXTriggers = "DL_UART_DMA_INTERRUPT_TX";
UART1.enabledInterrupts = ["DMA_DONE_RX"];
UART1.enabledDMARXTriggers = "DL_UART_DMA_INTERRUPT_RX";
UART1.peripheral.$assign = "UART0";
UART1.peripheral.rxPin.$assign = "PA11";
UART1.peripheral.txPin.$assign = "PA10";
UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
UART1.DMA_CHANNEL_TX.$name = "DMA_CH0";
UART1.DMA_CHANNEL_TX.addressMode = "b2f";
UART1.DMA_CHANNEL_TX.srcLength = "BYTE";
UART1.DMA_CHANNEL_TX.dstLength = "BYTE";
UART1.DMA_CHANNEL_TX.peripheral.$assign = "DMA_CH0";
UART1.DMA_CHANNEL_RX.$name = "DMA_CH1";
UART1.DMA_CHANNEL_RX.addressMode = "f2b";
UART1.DMA_CHANNEL_RX.srcLength = "BYTE";
UART1.DMA_CHANNEL_RX.dstLength = "BYTE";
UART1.DMA_CHANNEL_RX.transferMode = "FULL_CH_REPEAT_SINGLE";
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.
*/
pinFunction4.peripheral.$suggestSolution = "SYSCTL";
pinFunction4.peripheral.hfxInPin.$suggestSolution = "PA5";
pinFunction4.peripheral.hfxOutPin.$suggestSolution = "PA6";
I2C1.peripheral.$suggestSolution = "I2C1";
UART1.DMA_CHANNEL_RX.peripheral.$suggestSolution = "DMA_CH1";