main.syscfg 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  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 I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
  19. const I2C1 = I2C.addInstance();
  20. const I2C2 = I2C.addInstance();
  21. const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
  22. const PWM1 = PWM.addInstance();
  23. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  24. const TIMER = scripting.addModule("/ti/driverlib/TIMER", {}, false);
  25. const TIMER1 = TIMER.addInstance();
  26. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
  27. /**
  28. * Write custom configuration values to the imported modules.
  29. */
  30. ADC121.$name = "ADC_Controller";
  31. ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
  32. ADC121.powerDownMode = "DL_ADC12_POWER_DOWN_MODE_MANUAL";
  33. ADC121.sampleTime0 = "12.5 us";
  34. ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM0_RESULT_LOADED"];
  35. ADC121.peripheral.adcPin0.$assign = "PA27";
  36. ADC121.adcPin0Config.$name = "ti_driverlib_gpio_GPIOPinGeneric5";
  37. ADC121.adcPin0Config.hideOutputInversion = scripting.forceWrite(false);
  38. Board.configureUnused = true;
  39. Board.peripheral.$assign = "DEBUGSS";
  40. Board.peripheral.swclkPin.$assign = "PA20";
  41. Board.peripheral.swdioPin.$assign = "PA19";
  42. GPIO1.$name = "GPIO_Battery_Charging";
  43. GPIO1.port = "PORTB";
  44. GPIO1.associatedPins[0].$name = "PIN_PB7";
  45. GPIO1.associatedPins[0].pin.$assign = "PB7";
  46. GPIO2.$name = "GPIO_Battery_Discharging";
  47. GPIO2.port = "PORTB";
  48. GPIO2.associatedPins[0].$name = "PIN_PB6";
  49. GPIO2.associatedPins[0].pin.$assign = "PB6";
  50. GPIO3.port = "PORTA";
  51. GPIO3.$name = "GPIO_ADDR_PINS";
  52. GPIO3.associatedPins.create(4);
  53. GPIO3.associatedPins[0].$name = "ADDR_0";
  54. GPIO3.associatedPins[0].direction = "INPUT";
  55. GPIO3.associatedPins[0].pin.$assign = "PA14";
  56. GPIO3.associatedPins[1].$name = "ADDR_1";
  57. GPIO3.associatedPins[1].direction = "INPUT";
  58. GPIO3.associatedPins[1].pin.$assign = "PA15";
  59. GPIO3.associatedPins[2].$name = "ADDR_2";
  60. GPIO3.associatedPins[2].direction = "INPUT";
  61. GPIO3.associatedPins[2].pin.$assign = "PA16";
  62. GPIO3.associatedPins[3].$name = "ADDR_3";
  63. GPIO3.associatedPins[3].direction = "INPUT";
  64. GPIO3.associatedPins[3].pin.$assign = "PA17";
  65. I2C1.$name = "I2C_0";
  66. I2C1.basicEnableTarget = true;
  67. I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
  68. I2C1.basicTargetAddress = 0x20;
  69. I2C1.peripheral.$assign = "I2C0";
  70. I2C1.peripheral.sdaPin.$assign = "PA0";
  71. I2C1.peripheral.sclPin.$assign = "PA1";
  72. I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  73. I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  74. I2C2.$name = "I2C_1";
  75. I2C2.basicEnableController = true;
  76. I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
  77. I2C2.enableTimeoutA = true;
  78. I2C2.enableTimeoutB = true;
  79. I2C2.timeoutACount = 25;
  80. I2C2.timeoutBCount = 25;
  81. I2C2.intGeneric = ["TIMEOUT_A","TIMEOUT_B"];
  82. I2C2.peripheral.$assign = "I2C1";
  83. I2C2.peripheral.sdaPin.$assign = "PA3";
  84. I2C2.peripheral.sclPin.$assign = "PA4";
  85. I2C2.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  86. I2C2.sdaPinConfig.enableConfig = true;
  87. I2C2.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  88. I2C2.sclPinConfig.enableConfig = true;
  89. PWM1.$name = "PWM_0";
  90. PWM1.timerCount = 320;
  91. PWM1.timerStartTimer = true;
  92. PWM1.ccIndex = [0];
  93. PWM1.peripheral.ccp0Pin.$assign = "PA5";
  94. PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
  95. PWM1.PWM_CHANNEL_0.invert = true;
  96. PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  97. SYSCTL.clockTreeEn = true;
  98. SYSCTL.powerPolicy = "STANDBY0";
  99. SYSCTL.forceDefaultClkConfig = true;
  100. SYSCTL.validateClkStatus = true;
  101. TIMER1.$name = "TIMER_0";
  102. TIMER1.timerClkSrc = "LFCLK";
  103. TIMER1.timerClkPrescale = 33;
  104. TIMER1.timerMode = "PERIODIC";
  105. TIMER1.timerPeriod = "300 ms";
  106. TIMER1.interrupts = ["ZERO"];
  107. TIMER1.peripheral.$assign = "TIMG0";
  108. ProjectConfig.migrationCondition = true;
  109. /**
  110. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  111. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  112. * re-solve from scratch.
  113. */
  114. ADC121.peripheral.$suggestSolution = "ADC0";
  115. PWM1.peripheral.$suggestSolution = "TIMG6";