mspm0g3507.syscfg 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470
  1. /**
  2. * These arguments were used when this file was generated. They will be automatically applied on subsequent loads
  3. * via the GUI or CLI. Run CLI with '--help' for additional information on how to override these arguments.
  4. * @cliArgs --device "MSPM0G350X" --part "Default" --package "LQFP-48(PT)" --product "mspm0_sdk@2.01.00.03"
  5. * @v2CliArgs --device "MSPM0G3507" --package "LQFP-48(PT)" --product "mspm0_sdk@2.01.00.03"
  6. * @versions {"tool":"1.21.0+3721"}
  7. */
  8. /**
  9. * Import the modules used in this configuration.
  10. */
  11. const ADC12 = scripting.addModule("/ti/driverlib/ADC12", {}, false);
  12. const ADC121 = ADC12.addInstance();
  13. const ADC122 = ADC12.addInstance();
  14. const Board = scripting.addModule("/ti/driverlib/Board");
  15. const COMP = scripting.addModule("/ti/driverlib/COMP", {}, false);
  16. const COMP1 = COMP.addInstance();
  17. const COMP2 = COMP.addInstance();
  18. const DAC12 = scripting.addModule("/ti/driverlib/DAC12");
  19. const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
  20. const GPIO1 = GPIO.addInstance();
  21. const GPIO2 = GPIO.addInstance();
  22. const GPIO3 = GPIO.addInstance();
  23. const GPIO4 = GPIO.addInstance();
  24. const MATHACL = scripting.addModule("/ti/driverlib/MATHACL");
  25. const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
  26. const MCAN1 = MCAN.addInstance();
  27. const OPA = scripting.addModule("/ti/driverlib/OPA", {}, false);
  28. const OPA1 = OPA.addInstance();
  29. const OPA2 = OPA.addInstance();
  30. const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
  31. const PWM1 = PWM.addInstance();
  32. const PWM2 = PWM.addInstance();
  33. const PWM3 = PWM.addInstance();
  34. const PWM4 = PWM.addInstance();
  35. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  36. const SYSTICK = scripting.addModule("/ti/driverlib/SYSTICK");
  37. const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
  38. const TIMER1 = TIMER.addInstance();
  39. const TIMER2 = TIMER.addInstance();
  40. const UART = scripting.addModule("/ti/driverlib/UART", {}, false);
  41. const UART1 = UART.addInstance();
  42. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
  43. /**
  44. * Write custom configuration values to the imported modules.
  45. */
  46. const divider5 = system.clockTree["PLL_CLK1_DIV"];
  47. divider5.divideValue = 4;
  48. const divider6 = system.clockTree["PLL_CLK2X_DIV"];
  49. divider6.divideValue = 4;
  50. const divider7 = system.clockTree["PLL_PDIV"];
  51. divider7.divideValue = 2;
  52. const divider9 = system.clockTree["UDIV"];
  53. divider9.divideValue = 2;
  54. const gate7 = system.clockTree["MFCLKGATE"];
  55. gate7.enable = true;
  56. const gate8 = system.clockTree["MFPCLKGATE"];
  57. gate8.enable = true;
  58. const multiplier2 = system.clockTree["PLL_QDIV"];
  59. multiplier2.multiplyValue = 9;
  60. const mux2 = system.clockTree["CANCLKMUX"];
  61. mux2.inputSelect = "CANCLKMUX_PLLCLK1_OUT";
  62. const mux4 = system.clockTree["EXHFMUX"];
  63. mux4.inputSelect = "EXHFMUX_XTAL";
  64. const mux8 = system.clockTree["HSCLKMUX"];
  65. mux8.inputSelect = "HSCLKMUX_SYSPLL2X";
  66. const pinFunction4 = system.clockTree["HFXT"];
  67. pinFunction4.inputFreq = 8;
  68. pinFunction4.HFXTStartup = 40;
  69. ADC121.$name = "ADC12_0";
  70. ADC121.trigSrc = "DL_ADC12_TRIG_SRC_EVENT";
  71. ADC121.samplingOperationMode = "sequence";
  72. ADC121.subChanID = 12;
  73. ADC121.repeatMode = true;
  74. ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
  75. ADC121.adcMem5trig = "DL_ADC12_TRIGGER_MODE_TRIGGER_NEXT";
  76. ADC121.sampleTime0 = "0.25us";
  77. ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_13";
  78. ADC121.adcMem4trig = "DL_ADC12_TRIGGER_MODE_TRIGGER_NEXT";
  79. ADC121.adcMem0stime = "DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP1";
  80. ADC121.sampleTime1 = "3us";
  81. ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_6";
  82. ADC121.adcMem2chansel = "DL_ADC12_INPUT_CHAN_12";
  83. ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM1_RESULT_LOADED"];
  84. ADC121.endAdd = 4;
  85. ADC121.interruptPriority = "2";
  86. ADC121.peripheral.$assign = "ADC0";
  87. ADC121.peripheral.adcPin6.$assign = "PB20";
  88. ADC121.peripheral.adcPin12.$assign = "PA14";
  89. ADC121.peripheral.adcPin0.$assign = "PA27";
  90. ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric16";
  91. ADC121.adcPin6Config.$name = "ti_driverlib_gpio_GPIOPinGeneric9";
  92. ADC121.adcPin12Config.$name = "ti_driverlib_gpio_GPIOPinGeneric18";
  93. ADC122.$name = "ADC12_1";
  94. ADC122.adcMem0chansel = "DL_ADC12_INPUT_CHAN_13";
  95. ADC122.trigSrc = "DL_ADC12_TRIG_SRC_EVENT";
  96. ADC122.repeatMode = true;
  97. ADC122.subChanID = 12;
  98. ADC122.samplingOperationMode = "sequence";
  99. ADC122.adcMem2chansel = "DL_ADC12_INPUT_CHAN_5";
  100. ADC122.adcMem1chansel = "DL_ADC12_INPUT_CHAN_6";
  101. ADC122.adcMem3chansel = "DL_ADC12_INPUT_CHAN_4";
  102. ADC122.sampleTime0 = "0.25us";
  103. ADC122.adcMem0stime = "DL_ADC12_SAMPLE_TIMER_SOURCE_SCOMP1";
  104. ADC122.sampleTime1 = "3us";
  105. ADC122.endAdd = 4;
  106. ADC122.adcMem4chansel = "DL_ADC12_INPUT_CHAN_7";
  107. ADC122.adcMem4trig = "DL_ADC12_TRIGGER_MODE_TRIGGER_NEXT";
  108. ADC122.peripheral.$assign = "ADC1";
  109. ADC122.peripheral.adcPin6.$assign = "PB19";
  110. ADC122.peripheral.adcPin5.$assign = "PB18";
  111. ADC122.peripheral.adcPin4.$assign = "PB17";
  112. ADC122.peripheral.adcPin7.$assign = "PA21";
  113. ADC122.adcPin4Config.$name = "ti_driverlib_gpio_GPIOPinGeneric19";
  114. ADC122.adcPin5Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  115. ADC122.adcPin6Config.$name = "ti_driverlib_gpio_GPIOPinGeneric23";
  116. ADC122.adcPin7Config.$name = "ti_driverlib_gpio_GPIOPinGeneric22";
  117. Board.peripheral.$assign = "DEBUGSS";
  118. COMP1.$name = "COMP_0";
  119. COMP1.controlSelect = "DL_COMP_DAC_CONTROL_SW";
  120. COMP1.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC";
  121. COMP1.negChannel = "DL_COMP_IMSEL_CHANNEL_1";
  122. COMP1.channelEnable = ["POS"];
  123. COMP1.terminalSelect = "DL_COMP_REF_TERMINAL_SELECT_NEG";
  124. COMP1.posChannel = "DL_COMP_IPSEL_CHANNEL_1";
  125. COMP1.polarity = "DL_COMP_POLARITY_INV";
  126. COMP1.interruptPriority = "1";
  127. COMP1.setDACCode0 = 0x99;
  128. COMP1.peripheral.compPinPos1.$assign = "PB24";
  129. COMP1.compPinPos1Config.$name = "ti_driverlib_gpio_GPIOPinGeneric21";
  130. COMP2.$name = "COMP_FLEDCHECK";
  131. COMP2.channelEnable = ["POS"];
  132. COMP2.vSource = "DL_COMP_REF_SOURCE_VDDA_DAC";
  133. COMP2.terminalSelect = "DL_COMP_REF_TERMINAL_SELECT_NEG";
  134. COMP2.controlSelect = "DL_COMP_DAC_CONTROL_SW";
  135. COMP2.hysteresis = "DL_COMP_HYSTERESIS_10";
  136. COMP2.setDACCode1 = 0x20;
  137. COMP2.enableOutputFilter = true;
  138. COMP2.setDACCode0 = 0xF;
  139. COMP2.enabledInterrupts = ["DL_COMP_INTERRUPT_OUTPUT_EDGE","DL_COMP_INTERRUPT_OUTPUT_EDGE_INV"];
  140. COMP2.interruptPriority = "1";
  141. COMP2.peripheral.$assign = "COMP0";
  142. COMP2.peripheral.compPinPos0.$assignAllowConflicts = "PA26";
  143. COMP2.compPinPos0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric24";
  144. DAC12.dacOutputPinEn = true;
  145. DAC12.dacOutput12 = 2048;
  146. DAC12.dacAmplifier = "ON";
  147. DAC12.peripheral.$assign = "DAC0";
  148. DAC12.peripheral.OutPin.$assign = "PA15";
  149. DAC12.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric14";
  150. GPIO1.$name = "INPUT";
  151. GPIO1.associatedPins.create(2);
  152. GPIO1.associatedPins[0].$name = "BREAK";
  153. GPIO1.associatedPins[0].direction = "INPUT";
  154. GPIO1.associatedPins[0].assignedPort = "PORTA";
  155. GPIO1.associatedPins[0].assignedPin = "28";
  156. GPIO1.associatedPins[0].polarity = "RISE";
  157. GPIO1.associatedPins[0].pin.$assign = "PA28";
  158. GPIO1.associatedPins[1].direction = "INPUT";
  159. GPIO1.associatedPins[1].assignedPort = "PORTA";
  160. GPIO1.associatedPins[1].assignedPin = "9";
  161. GPIO1.associatedPins[1].$name = "Cadence_in";
  162. GPIO2.$name = "HALL";
  163. GPIO2.associatedPins.create(3);
  164. GPIO2.associatedPins[0].$name = "HALLA";
  165. GPIO2.associatedPins[0].direction = "INPUT";
  166. GPIO2.associatedPins[0].interruptEn = true;
  167. GPIO2.associatedPins[0].polarity = "RISE_FALL";
  168. GPIO2.associatedPins[0].assignedPin = "8";
  169. GPIO2.associatedPins[0].assignedPort = "PORTA";
  170. GPIO2.associatedPins[0].interruptPriority = "1";
  171. GPIO2.associatedPins[0].pin.$assign = "PA8";
  172. GPIO2.associatedPins[1].$name = "HALLB";
  173. GPIO2.associatedPins[1].direction = "INPUT";
  174. GPIO2.associatedPins[1].interruptEn = true;
  175. GPIO2.associatedPins[1].polarity = "RISE_FALL";
  176. GPIO2.associatedPins[1].assignedPort = "PORTB";
  177. GPIO2.associatedPins[1].assignedPin = "3";
  178. GPIO2.associatedPins[1].pin.$assign = "PB3";
  179. GPIO2.associatedPins[2].$name = "HALLC";
  180. GPIO2.associatedPins[2].direction = "INPUT";
  181. GPIO2.associatedPins[2].interruptEn = true;
  182. GPIO2.associatedPins[2].polarity = "RISE_FALL";
  183. GPIO2.associatedPins[2].assignedPort = "PORTB";
  184. GPIO2.associatedPins[2].assignedPin = "2";
  185. GPIO2.associatedPins[2].pin.$assign = "PB2";
  186. GPIO3.$name = "OUTPUT";
  187. GPIO3.associatedPins[0].$name = "POWER_EN";
  188. GPIO3.associatedPins[0].assignedPort = "PORTA";
  189. GPIO3.associatedPins[0].assignedPin = "23";
  190. GPIO3.associatedPins[0].pin.$assign = "PA23";
  191. GPIO4.$name = "LIGHT_DETECT";
  192. GPIO4.associatedPins.create(3);
  193. GPIO4.associatedPins[0].$name = "BACK";
  194. GPIO4.associatedPins[0].interruptEn = true;
  195. GPIO4.associatedPins[0].direction = "INPUT";
  196. GPIO4.associatedPins[0].polarity = "RISE";
  197. GPIO4.associatedPins[0].pin.$assign = "PB15";
  198. GPIO4.associatedPins[1].$name = "RIGHT";
  199. GPIO4.associatedPins[1].direction = "INPUT";
  200. GPIO4.associatedPins[1].interruptEn = true;
  201. GPIO4.associatedPins[1].polarity = "RISE";
  202. GPIO4.associatedPins[1].pin.$assign = "PB8";
  203. GPIO4.associatedPins[2].$name = "LEFT";
  204. GPIO4.associatedPins[2].direction = "INPUT";
  205. GPIO4.associatedPins[2].interruptEn = true;
  206. GPIO4.associatedPins[2].polarity = "RISE";
  207. GPIO4.associatedPins[2].pin.$assign = "PA3";
  208. MCAN1.$name = "MCAN0";
  209. MCAN1.desiredNomRate = 250;
  210. MCAN1.fdMode = false;
  211. MCAN1.emulationEnable = true;
  212. MCAN1.autoWkupEnable = true;
  213. MCAN1.txpEnable = true;
  214. MCAN1.wkupReqEnable = true;
  215. MCAN1.lss = 0;
  216. MCAN1.flesa = 0;
  217. MCAN1.lse = 0;
  218. MCAN1.txStartAddr = 0;
  219. MCAN1.txBufNum = 0;
  220. MCAN1.txFIFOSize = 32;
  221. MCAN1.txBufElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
  222. MCAN1.txEventFIFOStartAddr = 0;
  223. MCAN1.txEventFIFOSize = 32;
  224. MCAN1.txEventFIFOWaterMark = 25;
  225. MCAN1.rxFIFO0startAddr = 0;
  226. MCAN1.rxFIFO0size = 32;
  227. MCAN1.rxFIFO0waterMark = 25;
  228. MCAN1.rxFIFO1startAddr = 0;
  229. MCAN1.rxFIFO1size = 32;
  230. MCAN1.rxFIFO1waterMark = 25;
  231. MCAN1.rxBufStartAddr = 0;
  232. MCAN1.rxBufElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
  233. MCAN1.rxFIFO0ElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
  234. MCAN1.rxFIFO1ElemSize = "DL_MCAN_ELEM_SIZE_8BYTES";
  235. MCAN1.additionalCoreConfig = true;
  236. MCAN1.overrideRetention = true;
  237. MCAN1.enableInterrupt = true;
  238. MCAN1.interruptFlags = ["DL_MCAN_INTERRUPT_RF0N","DL_MCAN_INTERRUPT_TC","DL_MCAN_INTERRUPT_TEFN"];
  239. MCAN1.interruptLine = ["DL_MCAN_INTR_LINE_NUM_1"];
  240. MCAN1.interruptLine1Flag = ["DL_MCAN_INTR_MASK_ALL"];
  241. MCAN1.m0interrupts = ["DL_MCAN_MSP_INTERRUPT_LINE1"];
  242. MCAN1.tdcEnable = true;
  243. MCAN1.peripheral.$assign = "CANFD0";
  244. MCAN1.peripheral.rxPin.$assign = "PA13";
  245. MCAN1.peripheral.txPin.$assign = "PA12";
  246. MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric11";
  247. MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric12";
  248. scripting.suppress("MCAN is intended to work at the frequencies of 20, 40 or 80 Mhz\\.", MCAN1, "mcan_freq");
  249. OPA1.cfg0OutputPin = "ENABLED";
  250. OPA1.cfg0PSELChannel = "IN1_POS";
  251. OPA1.cfg0NSELChannel = "IN1_NEG";
  252. OPA1.$name = "OPA_BPHASE";
  253. OPA1.advBW = "HIGH";
  254. OPA1.peripheral.$assign = "OPA1";
  255. OPA1.peripheral.OutPin.$assign = "PA16";
  256. OPA1.peripheral.In1PosPin.$assign = "PA18";
  257. OPA1.peripheral.In1NegPin.$assign = "PA17";
  258. OPA1.OutPinConfig.direction = scripting.forceWrite("OUTPUT");
  259. OPA1.OutPinConfig.hideOutputInversion = scripting.forceWrite(false);
  260. OPA1.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  261. OPA1.In1PosPinConfig.hideOutputInversion = scripting.forceWrite(false);
  262. OPA1.In1PosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric15";
  263. OPA1.In1NegPinConfig.hideOutputInversion = scripting.forceWrite(false);
  264. OPA1.In1NegPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric17";
  265. OPA2.cfg0OutputPin = "ENABLED";
  266. OPA2.$name = "OPA_CPHASE";
  267. OPA2.advBW = "HIGH";
  268. OPA2.cfg0PSELChannel = "IN1_POS";
  269. OPA2.cfg0NSELChannel = "IN1_NEG";
  270. OPA2.peripheral.$assign = "OPA0";
  271. OPA2.peripheral.OutPin.$assign = "PA22";
  272. OPA2.peripheral.In1PosPin.$assign = "PA25";
  273. OPA2.peripheral.In1NegPin.$assign = "PA24";
  274. OPA2.OutPinConfig.direction = scripting.forceWrite("OUTPUT");
  275. OPA2.OutPinConfig.hideOutputInversion = scripting.forceWrite(false);
  276. OPA2.OutPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric20";
  277. OPA2.In1PosPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric6";
  278. OPA2.In1NegPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric13";
  279. PWM1.pwmMode = "CENTER_ALIGN";
  280. PWM1.dbInsertionMode = "Mode1";
  281. PWM1.event1PublisherChannel = 12;
  282. PWM1.deadBandEn = true;
  283. PWM1.$name = "MOTOR_PWM";
  284. PWM1.faultInputFilterEn = true;
  285. PWM1.faultChannel0BehaviorEntry = "LOW";
  286. PWM1.faultChannel2BehaviorEntry = "LOW";
  287. PWM1.faultChannel3BehaviorEntry = "LOW";
  288. PWM1.faultInputDetect = true;
  289. PWM1.faultSrcClkDetect = true;
  290. PWM1.faultFilterSamplePeriod = "8";
  291. PWM1.faultChannel2BehaviorExit = "LOW";
  292. PWM1.faultChannel3BehaviorExit = "LOW";
  293. PWM1.faultChannel0BehaviorExit = "LOW";
  294. PWM1.timerCount = 4500;
  295. PWM1.interrupts = ["FAULT_EVENT","LOAD_EVENT","ZERO_EVENT"];
  296. PWM1.faultHandlerEn = true;
  297. PWM1.event2ControllerInterruptEn = ["CC1_UP_EVENT"];
  298. PWM1.repeatCounter = 2;
  299. PWM1.enableRepeatCounter = true;
  300. PWM1.ccIndexCmpl = [0,1,2,3];
  301. PWM1.faultChannel1BehaviorEntry = "LOW";
  302. PWM1.faultChannel1BehaviorExit = "LOW";
  303. PWM1.event1ControllerInterruptEn = ["CC4_DN_EVENT","CC4_UP_EVENT"];
  304. PWM1.ccIndex = [0,1,2];
  305. PWM1.faultTimerCountExit = "FAULT_EXIT_CTR_CVAE_ACTION";
  306. PWM1.faultSource = ["4"];
  307. PWM1.faultConditionDuration = "FL_LATCH_LD_CLR";
  308. PWM1.crossTriggerEn = true;
  309. PWM1.crossTriggerAuthority = "Secondary";
  310. PWM1.secondaryCrossTriggerSource = "InputTrigger_1";
  311. PWM1.interruptPriority = "0";
  312. PWM1.dbRiseDelayTimerCount = 108;
  313. PWM1.dbFallDelayTimerCount = 108;
  314. PWM1.peripheral.$assign = "TIMA0";
  315. PWM1.peripheral.ccp0Pin.$assign = "PB14";
  316. PWM1.peripheral.ccp1Pin.$assign = "PA7";
  317. PWM1.peripheral.ccp0Pin_cmpl.$assign = "PB9";
  318. PWM1.peripheral.ccp1Pin_cmpl.$assign = "PA4";
  319. PWM1.peripheral.ccp2Pin.$assign = "PA10";
  320. PWM1.peripheral.ccp2Pin_cmpl.$assign = "PA11";
  321. PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
  322. PWM1.PWM_CHANNEL_0.dutyCycle = 25;
  323. PWM1.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC5";
  324. PWM1.ccp0PinConfig.direction = scripting.forceWrite("OUTPUT");
  325. PWM1.ccp0PinConfig.hideOutputInversion = scripting.forceWrite(false);
  326. PWM1.ccp0PinConfig.onlyInternalResistor = scripting.forceWrite(false);
  327. PWM1.ccp0PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  328. PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  329. PWM1.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
  330. PWM1.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
  331. PWM1.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
  332. PWM1.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  333. PWM1.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric31";
  334. PWM1.ccp0Pin_cmplConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric10";
  335. PWM1.ccp1Pin_cmplConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric32";
  336. PWM1.PWM_CHANNEL_2.$name = "ti_driverlib_pwm_PWMTimerCC2";
  337. PWM1.PWM_CHANNEL_2.dutyCycle = 50;
  338. PWM1.ccp2PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
  339. PWM1.ccp2Pin_cmplConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric8";
  340. PWM2.$name = "PWM_F";
  341. PWM2.timerCount = 2304;
  342. PWM2.ccIndex = [1];
  343. PWM2.pwmMode = "EDGE_ALIGN_UP";
  344. PWM2.clockDivider = 2;
  345. PWM2.peripheral.$assign = "TIMG7";
  346. PWM2.peripheral.ccp1Pin.$assign = "PA2";
  347. PWM2.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
  348. PWM2.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
  349. PWM2.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
  350. PWM2.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  351. PWM2.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric28";
  352. PWM2.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC3";
  353. PWM3.timerCount = 2304;
  354. PWM3.pwmMode = "EDGE_ALIGN_UP";
  355. PWM3.$name = "PWM_B_L";
  356. PWM3.peripheral.$assignAllowConflicts = "TIMG8";
  357. PWM3.peripheral.ccp0Pin.$assign = "PB6";
  358. PWM3.peripheral.ccp1Pin.$assign = "PB16";
  359. PWM3.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC1";
  360. PWM3.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC6";
  361. PWM3.ccp0PinConfig.direction = scripting.forceWrite("OUTPUT");
  362. PWM3.ccp0PinConfig.hideOutputInversion = scripting.forceWrite(false);
  363. PWM3.ccp0PinConfig.onlyInternalResistor = scripting.forceWrite(false);
  364. PWM3.ccp0PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  365. PWM3.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric25";
  366. PWM3.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
  367. PWM3.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
  368. PWM3.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
  369. PWM3.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  370. PWM3.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric26";
  371. PWM4.$name = "PWM_R";
  372. PWM4.ccIndex = [1];
  373. PWM4.clockDivider = 2;
  374. PWM4.timerCount = 2304;
  375. PWM4.pwmMode = "EDGE_ALIGN_UP";
  376. PWM4.peripheral.$assign = "TIMG12";
  377. PWM4.peripheral.ccp1Pin.$assign = "PA31";
  378. PWM4.ccp1PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric7";
  379. PWM4.ccp1PinConfig.direction = scripting.forceWrite("OUTPUT");
  380. PWM4.ccp1PinConfig.hideOutputInversion = scripting.forceWrite(false);
  381. PWM4.ccp1PinConfig.onlyInternalResistor = scripting.forceWrite(false);
  382. PWM4.ccp1PinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  383. PWM4.PWM_CHANNEL_1.$name = "ti_driverlib_pwm_PWMTimerCC4";
  384. SYSCTL.clockTreeEn = true;
  385. SYSCTL.forceDefaultClkConfig = true;
  386. SYSTICK.periodEnable = true;
  387. SYSTICK.interruptEnable = true;
  388. SYSTICK.systickEnable = true;
  389. SYSTICK.period = 72000;
  390. TIMER1.$name = "HALLTIMER";
  391. TIMER1.timerClkDiv = 5;
  392. TIMER1.timerClkPrescale = 4;
  393. TIMER1.timerPeriod = "16.67 ms";
  394. TIMER1.timerStartTimer = true;
  395. TIMER1.interrupts = ["ZERO"];
  396. TIMER1.timerMode = "PERIODIC_UP";
  397. TIMER1.interruptPriority = "1";
  398. TIMER1.peripheral.$assign = "TIMG6";
  399. TIMER2.$name = "HALL_CNT";
  400. TIMER2.timerMode = "PERIODIC_UP";
  401. TIMER2.timerPeriod = "0.03ms";
  402. TIMER2.interrupts = ["ZERO"];
  403. TIMER2.timerStartTimer = true;
  404. TIMER2.interruptPriority = "3";
  405. TIMER2.peripheral.$assign = "TIMG0";
  406. UART1.$name = "UART_HMI";
  407. UART1.enabledInterrupts = ["EOT_DONE","RX"];
  408. UART1.interruptPriority = "3";
  409. UART1.peripheral.$assign = "UART0";
  410. UART1.peripheral.rxPin.$assign = "PA1";
  411. UART1.peripheral.txPin.$assign = "PA0";
  412. UART1.txPinConfig.direction = scripting.forceWrite("OUTPUT");
  413. UART1.txPinConfig.hideOutputInversion = scripting.forceWrite(false);
  414. UART1.txPinConfig.onlyInternalResistor = scripting.forceWrite(false);
  415. UART1.txPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  416. UART1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  417. UART1.rxPinConfig.hideOutputInversion = scripting.forceWrite(false);
  418. UART1.rxPinConfig.onlyInternalResistor = scripting.forceWrite(false);
  419. UART1.rxPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  420. UART1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric30";
  421. ProjectConfig.deviceSpin = "MSPM0G3507";
  422. ProjectConfig.genLinker = false;
  423. ProjectConfig.genStartup = false;
  424. 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);
  425. scripting.suppress("Migrating requires going through the Switch Board or Device menu in the Device View section\\.", ProjectConfig, "deviceSpin");
  426. /**
  427. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  428. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  429. * re-solve from scratch.
  430. */
  431. Board.peripheral.swclkPin.$suggestSolution = "PA20";
  432. Board.peripheral.swdioPin.$suggestSolution = "PA19";
  433. COMP1.peripheral.$suggestSolution = "COMP1";
  434. GPIO1.associatedPins[1].pin.$suggestSolution = "PA9";