main.syscfg 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  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 Board = scripting.addModule("/ti/driverlib/Board");
  12. const GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
  13. const GPIO1 = GPIO.addInstance();
  14. const GPIO2 = GPIO.addInstance();
  15. const GPIO3 = GPIO.addInstance();
  16. const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
  17. const I2C1 = I2C.addInstance();
  18. const I2C2 = I2C.addInstance();
  19. const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
  20. const PWM1 = PWM.addInstance();
  21. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  22. const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
  23. const TIMER1 = TIMER.addInstance();
  24. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
  25. /**
  26. * Write custom configuration values to the imported modules.
  27. */
  28. Board.configureUnused = true;
  29. Board.peripheral.$assign = "DEBUGSS";
  30. Board.peripheral.swclkPin.$assign = "PA20";
  31. Board.peripheral.swdioPin.$assign = "PA19";
  32. GPIO1.$name = "GPIO_Battery_Charging";
  33. GPIO1.associatedPins.create(8);
  34. GPIO1.associatedPins[0].$name = "PIN_0";
  35. GPIO1.associatedPins[0].pin.$assign = "PB7";
  36. GPIO1.associatedPins[1].$name = "PIN_1";
  37. GPIO1.associatedPins[1].pin.$assign = "PB9";
  38. GPIO1.associatedPins[2].$name = "PIN_2";
  39. GPIO1.associatedPins[2].pin.$assign = "PB15";
  40. GPIO1.associatedPins[3].$name = "PIN_3";
  41. GPIO1.associatedPins[3].pin.$assign = "PA12";
  42. GPIO1.associatedPins[4].$name = "PIN_4";
  43. GPIO1.associatedPins[4].pin.$assign = "PB19";
  44. GPIO1.associatedPins[5].$name = "PIN_5";
  45. GPIO1.associatedPins[5].pin.$assign = "PB20";
  46. GPIO1.associatedPins[6].$name = "PIN_6";
  47. GPIO1.associatedPins[6].pin.$assign = "PA24";
  48. GPIO1.associatedPins[7].$name = "PIN_7";
  49. GPIO1.associatedPins[7].pin.$assign = "PA26";
  50. GPIO2.$name = "GPIO_Battery_Discharging";
  51. GPIO2.associatedPins.create(8);
  52. GPIO2.associatedPins[0].$name = "PIN_L0";
  53. GPIO2.associatedPins[0].pin.$assign = "PB6";
  54. GPIO2.associatedPins[1].$name = "PIN_L1";
  55. GPIO2.associatedPins[1].pin.$assign = "PB8";
  56. GPIO2.associatedPins[2].$name = "PIN_L2";
  57. GPIO2.associatedPins[2].pin.$assign = "PB14";
  58. GPIO2.associatedPins[3].$name = "PIN_L3";
  59. GPIO2.associatedPins[3].pin.$assign = "PB16";
  60. GPIO2.associatedPins[4].$name = "PIN_L4";
  61. GPIO2.associatedPins[4].pin.$assign = "PB18";
  62. GPIO2.associatedPins[5].$name = "PIN_L5";
  63. GPIO2.associatedPins[5].pin.$assign = "PA22";
  64. GPIO2.associatedPins[6].$name = "PIN_L6";
  65. GPIO2.associatedPins[6].pin.$assign = "PB24";
  66. GPIO2.associatedPins[7].$name = "PIN_L7";
  67. GPIO2.associatedPins[7].pin.$assign = "PA25";
  68. GPIO3.port = "PORTA";
  69. GPIO3.$name = "GPIO_ADDR_PINS";
  70. GPIO3.associatedPins.create(4);
  71. GPIO3.associatedPins[0].$name = "ADDR_0";
  72. GPIO3.associatedPins[0].direction = "INPUT";
  73. GPIO3.associatedPins[0].pin.$assign = "PA14";
  74. GPIO3.associatedPins[1].$name = "ADDR_1";
  75. GPIO3.associatedPins[1].direction = "INPUT";
  76. GPIO3.associatedPins[1].pin.$assign = "PA15";
  77. GPIO3.associatedPins[2].$name = "ADDR_2";
  78. GPIO3.associatedPins[2].direction = "INPUT";
  79. GPIO3.associatedPins[2].pin.$assign = "PA16";
  80. GPIO3.associatedPins[3].$name = "ADDR_3";
  81. GPIO3.associatedPins[3].direction = "INPUT";
  82. GPIO3.associatedPins[3].pin.$assign = "PA17";
  83. I2C1.$name = "I2C_0";
  84. I2C1.basicEnableTarget = true;
  85. I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
  86. I2C1.basicTargetAddress = 0x20;
  87. I2C1.peripheral.$assign = "I2C0";
  88. I2C1.peripheral.sdaPin.$assign = "PA0";
  89. I2C1.peripheral.sclPin.$assign = "PA1";
  90. I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  91. I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  92. I2C2.$name = "I2C_1";
  93. I2C2.basicEnableController = true;
  94. I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
  95. I2C2.enableTimeoutA = true;
  96. I2C2.enableTimeoutB = true;
  97. I2C2.timeoutACount = 25;
  98. I2C2.timeoutBCount = 25;
  99. I2C2.intGeneric = ["TIMEOUT_A","TIMEOUT_B"];
  100. I2C2.peripheral.$assign = "I2C1";
  101. I2C2.peripheral.sdaPin.$assign = "PA3";
  102. I2C2.peripheral.sclPin.$assign = "PA4";
  103. I2C2.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  104. I2C2.sdaPinConfig.enableConfig = true;
  105. I2C2.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  106. I2C2.sclPinConfig.enableConfig = true;
  107. PWM1.$name = "PWM_0";
  108. PWM1.timerCount = 320;
  109. PWM1.timerStartTimer = true;
  110. PWM1.ccIndex = [0];
  111. PWM1.peripheral.ccp0Pin.$assign = "PA5";
  112. PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
  113. PWM1.PWM_CHANNEL_0.invert = true;
  114. PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  115. SYSCTL.clockTreeEn = true;
  116. SYSCTL.powerPolicy = "STANDBY0";
  117. SYSCTL.forceDefaultClkConfig = true;
  118. SYSCTL.validateClkStatus = true;
  119. TIMER1.$name = "TIMER_0";
  120. TIMER1.timerClkSrc = "LFCLK";
  121. TIMER1.timerClkPrescale = 33;
  122. TIMER1.timerMode = "PERIODIC";
  123. TIMER1.timerPeriod = "300 ms";
  124. TIMER1.interrupts = ["ZERO"];
  125. TIMER1.peripheral.$assign = "TIMG0";
  126. ProjectConfig.migrationCondition = true;
  127. /**
  128. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  129. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  130. * re-solve from scratch.
  131. */
  132. PWM1.peripheral.$suggestSolution = "TIMG6";