mspm0g3507.syscfg 21 KB

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