main.syscfg 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  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.03.00.08"
  5. * @v2CliArgs --device "MSPM0G3507" --package "LQFP-48(PT)" --product "mspm0_sdk@2.03.00.08"
  6. * @versions {"tool":"1.22.0+3893"}
  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 Board = scripting.addModule("/ti/driverlib/Board");
  14. const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
  15. const GPIO1 = GPIO.addInstance();
  16. const GPIO2 = GPIO.addInstance();
  17. const GPIO3 = GPIO.addInstance();
  18. const GPIO4 = GPIO.addInstance();
  19. const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
  20. const I2C1 = I2C.addInstance();
  21. const I2C2 = I2C.addInstance();
  22. const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
  23. const PWM1 = PWM.addInstance();
  24. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  25. const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
  26. const TIMER1 = TIMER.addInstance();
  27. const TIMER2 = TIMER.addInstance();
  28. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
  29. /**
  30. * Write custom configuration values to the imported modules.
  31. */
  32. ADC121.$name = "ADC_Controller";
  33. ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
  34. ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
  35. ADC121.sampleTime0 = "12.5 us";
  36. ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED"];
  37. ADC121.sampClkSrc = "DL_ADC12_CLOCK_ULPCLK";
  38. ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_4";
  39. ADC121.peripheral.adcPin4.$assign = "PB17";
  40. ADC121.adcPin4Config.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
  41. Board.configureUnused = true;
  42. Board.peripheral.$assign = "DEBUGSS";
  43. Board.peripheral.swclkPin.$assign = "PA20";
  44. Board.peripheral.swdioPin.$assign = "PA19";
  45. GPIO1.$name = "GPIO_Battery_Charging";
  46. GPIO1.associatedPins.create(8);
  47. GPIO1.associatedPins[0].$name = "PIN_PB7";
  48. GPIO1.associatedPins[0].pin.$assign = "PB7";
  49. GPIO1.associatedPins[1].$name = "PIN_PB9";
  50. GPIO1.associatedPins[1].pin.$assign = "PB9";
  51. GPIO1.associatedPins[2].$name = "PIN_PB15";
  52. GPIO1.associatedPins[2].pin.$assign = "PB15";
  53. GPIO1.associatedPins[3].$name = "PIN_PA12";
  54. GPIO1.associatedPins[3].pin.$assign = "PA12";
  55. GPIO1.associatedPins[4].$name = "PIN_PB19";
  56. GPIO1.associatedPins[4].pin.$assign = "PB19";
  57. GPIO1.associatedPins[5].$name = "PIN_PB20";
  58. GPIO1.associatedPins[5].pin.$assign = "PB20";
  59. GPIO1.associatedPins[6].$name = "PIN_PA24";
  60. GPIO1.associatedPins[6].pin.$assign = "PA24";
  61. GPIO1.associatedPins[7].$name = "PIN_PA26";
  62. GPIO1.associatedPins[7].pin.$assign = "PA26";
  63. GPIO2.$name = "GPIO_Battery_Discharging";
  64. GPIO2.associatedPins.create(8);
  65. GPIO2.associatedPins[0].$name = "PIN_PB6";
  66. GPIO2.associatedPins[0].pin.$assign = "PA6";
  67. GPIO2.associatedPins[1].$name = "PIN_PB8";
  68. GPIO2.associatedPins[1].pin.$assign = "PB8";
  69. GPIO2.associatedPins[2].$name = "PIN_PB14";
  70. GPIO2.associatedPins[2].pin.$assign = "PB14";
  71. GPIO2.associatedPins[3].$name = "PIN_PB16";
  72. GPIO2.associatedPins[3].pin.$assign = "PB16";
  73. GPIO2.associatedPins[4].$name = "PIN_PB18";
  74. GPIO2.associatedPins[4].pin.$assign = "PB18";
  75. GPIO2.associatedPins[5].$name = "PIN_PA22";
  76. GPIO2.associatedPins[5].pin.$assign = "PA22";
  77. GPIO2.associatedPins[6].$name = "PIN_PB24";
  78. GPIO2.associatedPins[6].pin.$assign = "PB24";
  79. GPIO2.associatedPins[7].$name = "PIN_PA25";
  80. GPIO2.associatedPins[7].pin.$assign = "PA25";
  81. GPIO3.port = "PORTA";
  82. GPIO3.$name = "GPIO_ADDR_PINS";
  83. GPIO3.associatedPins.create(4);
  84. GPIO3.associatedPins[0].$name = "ADDR_0";
  85. GPIO3.associatedPins[0].direction = "INPUT";
  86. GPIO3.associatedPins[0].pin.$assign = "PA14";
  87. GPIO3.associatedPins[1].$name = "ADDR_1";
  88. GPIO3.associatedPins[1].direction = "INPUT";
  89. GPIO3.associatedPins[1].pin.$assign = "PA15";
  90. GPIO3.associatedPins[2].$name = "ADDR_2";
  91. GPIO3.associatedPins[2].direction = "INPUT";
  92. GPIO3.associatedPins[2].pin.$assign = "PA16";
  93. GPIO3.associatedPins[3].$name = "ADDR_3";
  94. GPIO3.associatedPins[3].direction = "INPUT";
  95. GPIO3.associatedPins[3].pin.$assign = "PA17";
  96. GPIO4.$name = "GPIO_ControllerBoard";
  97. GPIO4.associatedPins.create(2);
  98. GPIO4.associatedPins[0].$name = "LED_Run";
  99. GPIO4.associatedPins[0].pin.$assign = "PA11";
  100. GPIO4.associatedPins[1].$name = "LED_Error";
  101. GPIO4.associatedPins[1].pin.$assign = "PA10";
  102. I2C1.$name = "I2C_0";
  103. I2C1.basicEnableTarget = true;
  104. I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
  105. I2C1.basicTargetAddress = 0x20;
  106. I2C1.peripheral.$assign = "I2C0";
  107. I2C1.peripheral.sdaPin.$assign = "PA0";
  108. I2C1.peripheral.sclPin.$assign = "PA1";
  109. I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  110. I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  111. I2C2.$name = "I2C_1";
  112. I2C2.basicEnableController = true;
  113. I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
  114. I2C2.enableTimeoutA = true;
  115. I2C2.enableTimeoutB = true;
  116. I2C2.timeoutACount = 25;
  117. I2C2.timeoutBCount = 25;
  118. I2C2.intGeneric = ["TIMEOUT_A","TIMEOUT_B"];
  119. I2C2.peripheral.$assign = "I2C1";
  120. I2C2.peripheral.sdaPin.$assign = "PA3";
  121. I2C2.peripheral.sclPin.$assign = "PA4";
  122. I2C2.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  123. I2C2.sdaPinConfig.enableConfig = true;
  124. I2C2.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  125. I2C2.sclPinConfig.enableConfig = true;
  126. PWM1.$name = "PWM_0";
  127. PWM1.timerStartTimer = true;
  128. PWM1.ccIndex = [0];
  129. PWM1.timerCount = 320;
  130. PWM1.peripheral.ccp0Pin.$assign = "PA5";
  131. PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
  132. PWM1.PWM_CHANNEL_0.invert = true;
  133. PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  134. SYSCTL.clockTreeEn = true;
  135. SYSCTL.powerPolicy = "STANDBY0";
  136. SYSCTL.forceDefaultClkConfig = true;
  137. SYSCTL.validateClkStatus = true;
  138. TIMER1.$name = "TIMER_0";
  139. TIMER1.timerClkSrc = "LFCLK";
  140. TIMER1.timerClkPrescale = 33;
  141. TIMER1.timerMode = "PERIODIC";
  142. TIMER1.timerPeriod = "300 ms";
  143. TIMER1.interrupts = ["ZERO"];
  144. TIMER1.peripheral.$assign = "TIMG0";
  145. TIMER2.$name = "TIMER_LED";
  146. TIMER2.profile = "Basic_Periodic";
  147. ProjectConfig.migrationCondition = true;
  148. /**
  149. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  150. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  151. * re-solve from scratch.
  152. */
  153. ADC121.peripheral.$suggestSolution = "ADC1";
  154. PWM1.peripheral.$suggestSolution = "TIMG6";
  155. TIMER2.peripheral.$suggestSolution = "TIMA0";