123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470 |
- /**
- * 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.01.00.03"
- * @v2CliArgs --device "MSPM0G3507" --package "LQFP-48(PT)" --product "mspm0_sdk@2.01.00.03"
- * @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 ADC122 = ADC12.addInstance();
- const Board = scripting.addModule("/ti/driverlib/Board");
- const COMP = scripting.addModule("/ti/driverlib/COMP", {}, false);
- const COMP1 = COMP.addInstance();
- const COMP2 = COMP.addInstance();
- const DAC12 = scripting.addModule("/ti/driverlib/DAC12");
- 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 OPA = scripting.addModule("/ti/driverlib/OPA", {}, false);
- const OPA1 = OPA.addInstance();
- const OPA2 = OPA.addInstance();
- const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
- const PWM1 = PWM.addInstance();
- const PWM2 = PWM.addInstance();
- const PWM3 = PWM.addInstance();
- const PWM4 = 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 TIMER2 = TIMER.addInstance();
- const UART = scripting.addModule("/ti/driverlib/UART", {}, false);
- const UART1 = UART.addInstance();
- const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
- /**
- * Write custom configuration values to the imported modules.
- */
- const divider5 = system.clockTree["PLL_CLK1_DIV"];
- divider5.divideValue = 4;
- const divider6 = system.clockTree["PLL_CLK2X_DIV"];
- divider6.divideValue = 4;
- const divider7 = system.clockTree["PLL_PDIV"];
- divider7.divideValue = 2;
- const divider9 = system.clockTree["UDIV"];
- divider9.divideValue = 2;
- const gate7 = system.clockTree["MFCLKGATE"];
- gate7.enable = true;
- const gate8 = system.clockTree["MFPCLKGATE"];
- gate8.enable = true;
- const multiplier2 = system.clockTree["PLL_QDIV"];
- multiplier2.multiplyValue = 9;
- const mux2 = system.clockTree["CANCLKMUX"];
- mux2.inputSelect = "CANCLKMUX_PLLCLK1_OUT";
- const mux4 = system.clockTree["EXHFMUX"];
- mux4.inputSelect = "EXHFMUX_XTAL";
- const mux8 = system.clockTree["HSCLKMUX"];
- mux8.inputSelect = "HSCLKMUX_SYSPLL2X";
- const pinFunction4 = system.clockTree["HFXT"];
- pinFunction4.inputFreq = 8;
- pinFunction4.HFXTStartup = 40;
- ADC121.$name = "ADC12_0";
- ADC121.trigSrc = "DL_ADC12_TRIG_SRC_EVENT";
- ADC121.samplingOperationMode = "sequence";
- ADC121.subChanID = 12;
- ADC121.repeatMode = true;
- ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
- ADC121.adcMem5trig = "DL_ADC12_TRIGGER_MODE_TRIGGER_NEXT";
- ADC121.sampleTime0 = "0.25us";
- ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_13";
- ADC121.adcMem4trig = "DL_ADC12_TRIGGER_MODE_TRIGGER_NEXT";
- ADC121.adcMem0stime = "DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP1";
- ADC121.sampleTime1 = "3us";
- ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_6";
- ADC121.adcMem2chansel = "DL_ADC12_INPUT_CHAN_12";
- ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM1_RESULT_LOADED"];
- ADC121.endAdd = 4;
- ADC121.interruptPriority = "2";
- ADC121.peripheral.$assign = "ADC0";
- ADC121.peripheral.adcPin6.$assign = "PB20";
- ADC121.peripheral.adcPin12.$assign = "PA14";
- ADC121.peripheral.adcPin0.$assign = "PA27";
- ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric16";
- ADC121.adcPin6Config.$name = "ti_driverlib_gpio_GPIOPinGeneric9";
- ADC121.adcPin12Config.$name = "ti_driverlib_gpio_GPIOPinGeneric18";
- ADC122.$name = "ADC12_1";
- ADC122.adcMem0chansel = "DL_ADC12_INPUT_CHAN_13";
- ADC122.trigSrc = "DL_ADC12_TRIG_SRC_EVENT";
- ADC122.repeatMode = true;
- ADC122.subChanID = 12;
- ADC122.samplingOperationMode = "sequence";
- ADC122.adcMem2chansel = "DL_ADC12_INPUT_CHAN_5";
- ADC122.adcMem1chansel = "DL_ADC12_INPUT_CHAN_6";
- ADC122.adcMem3chansel = "DL_ADC12_INPUT_CHAN_4";
- ADC122.sampleTime0 = "0.25us";
- ADC122.adcMem0stime = "DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP1";
- ADC122.sampleTime1 = "3us";
- ADC122.endAdd = 4;
- ADC122.adcMem4chansel = "DL_ADC12_INPUT_CHAN_7";
- ADC122.adcMem4trig = "DL_ADC12_TRIGGER_MODE_TRIGGER_NEXT";
- ADC122.peripheral.$assign = "ADC1";
- ADC122.peripheral.adcPin6.$assign = "PB19";
- ADC122.peripheral.adcPin5.$assign = "PB18";
- ADC122.peripheral.adcPin4.$assign = "PB17";
- ADC122.peripheral.adcPin7.$assign = "PA21";
- ADC122.adcPin4Config.$name = "ti_driverlib_gpio_GPIOPinGeneric19";
- ADC122.adcPin5Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
- ADC122.adcPin6Config.$name = "ti_driverlib_gpio_GPIOPinGeneric23";
- ADC122.adcPin7Config.$name = "ti_driverlib_gpio_GPIOPinGeneric22";
- Board.peripheral.$assign = "DEBUGSS";
- COMP1.$name = "COMP_0";
- COMP1.controlSelect = "DL_COMP_DAC_CONTROL_SW";
- COMP1.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC";
- COMP1.negChannel = "DL_COMP_IMSEL_CHANNEL_1";
- COMP1.channelEnable = ["POS"];
- COMP1.terminalSelect = "DL_COMP_REF_TERMINAL_SELECT_NEG";
- COMP1.posChannel = "DL_COMP_IPSEL_CHANNEL_1";
- COMP1.polarity = "DL_COMP_POLARITY_INV";
- COMP1.interruptPriority = "1";
- COMP1.setDACCode0 = 0x99;
- COMP1.peripheral.compPinPos1.$assign = "PB24";
- COMP1.compPinPos1Config.$name = "ti_driverlib_gpio_GPIOPinGeneric21";
- COMP2.$name = "COMP_FLEDCHECK";
- COMP2.channelEnable = ["POS"];
- COMP2.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC";
- COMP2.terminalSelect = "DL_COMP_REF_TERMINAL_SELECT_NEG";
- COMP2.controlSelect = "DL_COMP_DAC_CONTROL_SW";
- COMP2.hysteresis = "DL_COMP_HYSTERESIS_10";
- COMP2.setDACCode1 = 0x20;
- COMP2.enableOutputFilter = true;
- COMP2.setDACCode0 = 0xF;
- COMP2.enabledInterrupts = ["DL_COMP_INTERRUPT_OUTPUT_EDGE","DL_COMP_INTERRUPT_OUTPUT_EDGE_INV"];
- COMP2.interruptPriority = "1";
- COMP2.peripheral.$assign = "COMP0";
- COMP2.peripheral.compPinPos0.$assignAllowConflicts = "PA26";
- COMP2.compPinPos0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric24";
- DAC12.dacOutputPinEn = true;
- DAC12.dacOutput12 = 2048;
- DAC12.dacAmplifier = "ON";
- DAC12.peripheral.$assign = "DAC0";
- DAC12.peripheral.OutPin.$assign = "PA15";
- DAC12.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric14";
- GPIO1.$name = "INPUT";
- GPIO1.associatedPins.create(2);
- GPIO1.associatedPins[0].$name = "BREAK";
- GPIO1.associatedPins[0].direction = "INPUT";
- GPIO1.associatedPins[0].assignedPort = "PORTA";
- GPIO1.associatedPins[0].assignedPin = "28";
- GPIO1.associatedPins[0].polarity = "RISE";
- GPIO1.associatedPins[0].pin.$assign = "PA28";
- GPIO1.associatedPins[1].direction = "INPUT";
- GPIO1.associatedPins[1].assignedPort = "PORTA";
- GPIO1.associatedPins[1].assignedPin = "9";
- GPIO1.associatedPins[1].$name = "Cadence_in";
- GPIO2.$name = "HALL";
- GPIO2.associatedPins.create(3);
- GPIO2.associatedPins[0].$name = "HALLA";
- GPIO2.associatedPins[0].direction = "INPUT";
- GPIO2.associatedPins[0].interruptEn = true;
- GPIO2.associatedPins[0].polarity = "RISE_FALL";
- GPIO2.associatedPins[0].assignedPin = "8";
- GPIO2.associatedPins[0].assignedPort = "PORTA";
- GPIO2.associatedPins[0].interruptPriority = "1";
- GPIO2.associatedPins[0].pin.$assign = "PA8";
- GPIO2.associatedPins[1].$name = "HALLB";
- GPIO2.associatedPins[1].direction = "INPUT";
- GPIO2.associatedPins[1].interruptEn = true;
- GPIO2.associatedPins[1].polarity = "RISE_FALL";
- GPIO2.associatedPins[1].assignedPort = "PORTB";
- GPIO2.associatedPins[1].assignedPin = "3";
- GPIO2.associatedPins[1].pin.$assign = "PB3";
- GPIO2.associatedPins[2].$name = "HALLC";
- GPIO2.associatedPins[2].direction = "INPUT";
- GPIO2.associatedPins[2].interruptEn = true;
- GPIO2.associatedPins[2].polarity = "RISE_FALL";
- GPIO2.associatedPins[2].assignedPort = "PORTB";
- GPIO2.associatedPins[2].assignedPin = "2";
- GPIO2.associatedPins[2].pin.$assign = "PB2";
- GPIO3.$name = "OUTPUT";
- GPIO3.associatedPins[0].$name = "POWER_EN";
- GPIO3.associatedPins[0].assignedPort = "PORTA";
- GPIO3.associatedPins[0].assignedPin = "23";
- GPIO3.associatedPins[0].pin.$assign = "PA23";
- GPIO4.$name = "LIGHT_DETECT";
- GPIO4.associatedPins.create(3);
- GPIO4.associatedPins[0].$name = "BACK";
- GPIO4.associatedPins[0].interruptEn = true;
- GPIO4.associatedPins[0].direction = "INPUT";
- GPIO4.associatedPins[0].polarity = "RISE";
- GPIO4.associatedPins[0].pin.$assign = "PB15";
- GPIO4.associatedPins[1].$name = "RIGHT";
- GPIO4.associatedPins[1].direction = "INPUT";
- GPIO4.associatedPins[1].interruptEn = true;
- GPIO4.associatedPins[1].polarity = "RISE";
- GPIO4.associatedPins[1].pin.$assign = "PB8";
- GPIO4.associatedPins[2].$name = "LEFT";
- GPIO4.associatedPins[2].direction = "INPUT";
- GPIO4.associatedPins[2].interruptEn = true;
- GPIO4.associatedPins[2].polarity = "RISE";
- GPIO4.associatedPins[2].pin.$assign = "PA3";
- MCAN1.$name = "MCAN0";
- MCAN1.desiredNomRate = 250;
- MCAN1.fdMode = false;
- MCAN1.emulationEnable = true;
- MCAN1.autoWkupEnable = true;
- MCAN1.txpEnable = true;
- MCAN1.wkupReqEnable = true;
- MCAN1.lss = 0;
- MCAN1.flesa = 0;
- MCAN1.lse = 0;
- MCAN1.txStartAddr = 0;
- MCAN1.txBufNum = 0;
- MCAN1.txFIFOSize = 32;
- MCAN1.txBufElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
- MCAN1.txEventFIFOStartAddr = 0;
- MCAN1.txEventFIFOSize = 32;
- MCAN1.txEventFIFOWaterMark = 25;
- MCAN1.rxFIFO0startAddr = 0;
- MCAN1.rxFIFO0size = 32;
- MCAN1.rxFIFO0waterMark = 25;
- MCAN1.rxFIFO1startAddr = 0;
- MCAN1.rxFIFO1size = 32;
- MCAN1.rxFIFO1waterMark = 25;
- MCAN1.rxBufStartAddr = 0;
- MCAN1.rxBufElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
- MCAN1.rxFIFO0ElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
- MCAN1.rxFIFO1ElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
- MCAN1.additionalCoreConfig = true;
- MCAN1.overrideRetention = true;
- MCAN1.enableInterrupt = true;
- MCAN1.interruptFlags = ["DL_MCAN_INTERRUPT_RF0N","DL_MCAN_INTERRUPT_TC","DL_MCAN_INTERRUPT_TEFN"];
- MCAN1.interruptLine = ["DL_MCAN_INTR_LINE_NUM_1"];
- MCAN1.interruptLine1Flag = ["DL_MCAN_INTR_MASK_ALL"];
- MCAN1.m0interrupts = ["DL_MCAN_MSP_INTERRUPT_LINE1"];
- MCAN1.tdcEnable = true;
- MCAN1.peripheral.$assign = "CANFD0";
- MCAN1.peripheral.rxPin.$assign = "PA13";
- MCAN1.peripheral.txPin.$assign = "PA12";
- MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric11";
- MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric12";
- scripting.suppress("MCAN is intended to work at the frequencies of 20, 40 or 80 Mhz\\.", MCAN1, "mcan_freq");
- OPA1.cfg0OutputPin = "ENABLED";
- OPA1.cfg0PSELChannel = "IN1_POS";
- OPA1.cfg0NSELChannel = "IN1_NEG";
- OPA1.$name = "OPA_BPHASE";
- OPA1.advBW = "HIGH";
- OPA1.peripheral.$assign = "OPA1";
- OPA1.peripheral.OutPin.$assign = "PA16";
- OPA1.peripheral.In1PosPin.$assign = "PA18";
- OPA1.peripheral.In1NegPin.$assign = "PA17";
- OPA1.OutPinConfig.direction = scripting.forceWrite("OUTPUT");
- OPA1.OutPinConfig.hideOutputInversion = scripting.forceWrite(false);
- OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
- OPA1.In1PosPinConfig.hideOutputInversion = scripting.forceWrite(false);
- OPA1.In1PosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric15";
- OPA1.In1NegPinConfig.hideOutputInversion = scripting.forceWrite(false);
- OPA1.In1NegPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric17";
- OPA2.cfg0OutputPin = "ENABLED";
- OPA2.$name = "OPA_CPHASE";
- OPA2.advBW = "HIGH";
- OPA2.cfg0PSELChannel = "IN1_POS";
- OPA2.cfg0NSELChannel = "IN1_NEG";
- OPA2.peripheral.$assign = "OPA0";
- OPA2.peripheral.OutPin.$assign = "PA22";
- OPA2.peripheral.In1PosPin.$assign = "PA25";
- OPA2.peripheral.In1NegPin.$assign = "PA24";
- OPA2.OutPinConfig.direction = scripting.forceWrite("OUTPUT");
- OPA2.OutPinConfig.hideOutputInversion = scripting.forceWrite(false);
- OPA2.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric20";
- OPA2.In1PosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
- OPA2.In1NegPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric13";
- PWM1.pwmMode = "CENTER_ALIGN";
- PWM1.dbInsertionMode = "Mode1";
- PWM1.event1PublisherChannel = 12;
- PWM1.deadBandEn = true;
- PWM1.$name = "MOTOR_PWM";
- PWM1.faultInputFilterEn = true;
- PWM1.faultChannel0BehaviorEntry = "LOW";
- PWM1.faultChannel2BehaviorEntry = "LOW";
- PWM1.faultChannel3BehaviorEntry = "LOW";
- PWM1.faultInputDetect = true;
- PWM1.faultSrcClkDetect = true;
- PWM1.faultFilterSamplePeriod = "8";
- PWM1.faultChannel2BehaviorExit = "LOW";
- PWM1.faultChannel3BehaviorExit = "LOW";
- PWM1.faultChannel0BehaviorExit = "LOW";
- PWM1.timerCount = 4500;
- PWM1.interrupts = ["FAULT_EVENT","LOAD_EVENT","ZERO_EVENT"];
- PWM1.faultHandlerEn = true;
- PWM1.event2ControllerInterruptEn = ["CC1_UP_EVENT"];
- PWM1.repeatCounter = 2;
- PWM1.enableRepeatCounter = true;
- PWM1.ccIndexCmpl = [0,1,2,3];
- PWM1.faultChannel1BehaviorEntry = "LOW";
- PWM1.faultChannel1BehaviorExit = "LOW";
- PWM1.event1ControllerInterruptEn = ["CC4_DN_EVENT","CC4_UP_EVENT"];
- PWM1.ccIndex = [0,1,2];
- PWM1.faultTimerCountExit = "FAULT_EXIT_CTR_CVAE_ACTION";
- PWM1.faultSource = ["4"];
- PWM1.faultConditionDuration = "FL_LATCH_LD_CLR";
- PWM1.crossTriggerEn = true;
- PWM1.crossTriggerAuthority = "Secondary";
- PWM1.secondaryCrossTriggerSource = "InputTrigger_1";
- PWM1.interruptPriority = "0";
- PWM1.dbRiseDelayTimerCount = 108;
- PWM1.dbFallDelayTimerCount = 108;
- PWM1.peripheral.$assign = "TIMA0";
- PWM1.peripheral.ccp0Pin.$assign = "PB14";
- PWM1.peripheral.ccp1Pin.$assign = "PA7";
- PWM1.peripheral.ccp0Pin_cmpl.$assign = "PB9";
- PWM1.peripheral.ccp1Pin_cmpl.$assign = "PA4";
- PWM1.peripheral.ccp2Pin.$assign = "PA10";
- PWM1.peripheral.ccp2Pin_cmpl.$assign = "PA11";
- PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
- PWM1.PWM_CHANNEL_0.dutyCycle = 25;
- PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC5";
- 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_GPIOPinGeneric2";
- PWM1.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
- PWM1.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
- PWM1.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
- PWM1.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric31";
- PWM1.ccp0Pin_cmplConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric10";
- PWM1.ccp1Pin_cmplConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric32";
- PWM1.PWM_CHANNEL_2.$name = "ti_driverlib_pwm_PWMTimerCC2";
- PWM1.PWM_CHANNEL_2.dutyCycle = 50;
- PWM1.ccp2PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
- PWM1.ccp2Pin_cmplConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric8";
- PWM2.$name = "PWM_F";
- PWM2.timerCount = 2304;
- PWM2.ccIndex = [1];
- PWM2.pwmMode = "EDGE_ALIGN_UP";
- PWM2.clockDivider = 2;
- PWM2.peripheral.$assign = "TIMG7";
- PWM2.peripheral.ccp1Pin.$assign = "PA2";
- PWM2.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
- PWM2.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
- PWM2.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
- PWM2.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- PWM2.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric28";
- PWM2.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC3";
- PWM3.timerCount = 2304;
- PWM3.pwmMode = "EDGE_ALIGN_UP";
- PWM3.$name = "PWM_B_L";
- PWM3.peripheral.$assignAllowConflicts = "TIMG8";
- PWM3.peripheral.ccp0Pin.$assign = "PB6";
- PWM3.peripheral.ccp1Pin.$assign = "PB16";
- PWM3.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC1";
- PWM3.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC6";
- PWM3.ccp0PinConfig.direction = scripting.forceWrite("OUTPUT");
- PWM3.ccp0PinConfig.hideOutputInversion = scripting.forceWrite(false);
- PWM3.ccp0PinConfig.onlyInternalResistor = scripting.forceWrite(false);
- PWM3.ccp0PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- PWM3.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric25";
- PWM3.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
- PWM3.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
- PWM3.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
- PWM3.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- PWM3.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric26";
- PWM4.$name = "PWM_R";
- PWM4.ccIndex = [1];
- PWM4.clockDivider = 2;
- PWM4.timerCount = 2304;
- PWM4.pwmMode = "EDGE_ALIGN_UP";
- PWM4.peripheral.$assign = "TIMG12";
- PWM4.peripheral.ccp1Pin.$assign = "PA31";
- PWM4.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
- PWM4.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
- PWM4.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
- PWM4.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
- PWM4.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- PWM4.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC4";
- SYSCTL.clockTreeEn = true;
- SYSCTL.forceDefaultClkConfig = true;
- SYSTICK.periodEnable = true;
- SYSTICK.interruptEnable = true;
- SYSTICK.systickEnable = true;
- SYSTICK.period = 72000;
- TIMER1.$name = "HALLTIMER";
- TIMER1.timerClkDiv = 5;
- TIMER1.timerClkPrescale = 4;
- TIMER1.timerPeriod = "16.67 ms";
- TIMER1.timerStartTimer = true;
- TIMER1.interrupts = ["ZERO"];
- TIMER1.timerMode = "PERIODIC_UP";
- TIMER1.interruptPriority = "1";
- TIMER1.peripheral.$assign = "TIMG6";
- TIMER2.$name = "HALL_CNT";
- TIMER2.timerMode = "PERIODIC_UP";
- TIMER2.timerPeriod = "0.03ms";
- TIMER2.interrupts = ["ZERO"];
- TIMER2.timerStartTimer = true;
- TIMER2.interruptPriority = "3";
- TIMER2.peripheral.$assign = "TIMG0";
- UART1.$name = "UART_HMI";
- UART1.enabledInterrupts = ["EOT_DONE","RX"];
- UART1.interruptPriority = "3";
- UART1.peripheral.$assign = "UART0";
- UART1.peripheral.rxPin.$assign = "PA1";
- UART1.peripheral.txPin.$assign = "PA0";
- UART1.txPinConfig.direction = scripting.forceWrite("OUTPUT");
- UART1.txPinConfig.hideOutputInversion = scripting.forceWrite(false);
- UART1.txPinConfig.onlyInternalResistor = scripting.forceWrite(false);
- UART1.txPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
- UART1.rxPinConfig.hideOutputInversion = scripting.forceWrite(false);
- UART1.rxPinConfig.onlyInternalResistor = scripting.forceWrite(false);
- UART1.rxPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
- UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric30";
- ProjectConfig.deviceSpin = "MSPM0G3507";
- ProjectConfig.genLinker = false;
- ProjectConfig.genStartup = false;
- scripting.suppress("All four File Generation options must be enabled in order to guarantee Device Migration support\\. If an option is disabled, the user must manually configure that setting on its own file\\.", ProjectConfig);
- scripting.suppress("Migrating requires going through the Switch Board or Device menu in the Device View section\\.", ProjectConfig, "deviceSpin");
- /**
- * 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.
- */
- Board.peripheral.swclkPin.$suggestSolution = "PA20";
- Board.peripheral.swdioPin.$suggestSolution = "PA19";
- COMP1.peripheral.$suggestSolution = "COMP1";
- GPIO1.associatedPins[1].pin.$suggestSolution = "PA9";
|