main.syscfg 4.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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 GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
  12. const GPIO1 = GPIO.addInstance();
  13. const GPIO2 = GPIO.addInstance();
  14. const GPIO3 = GPIO.addInstance();
  15. const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
  16. const I2C1 = I2C.addInstance();
  17. const I2C2 = I2C.addInstance();
  18. const PWM = scripting.addModule("/ti/driverlib/PWM", {}, false);
  19. const PWM1 = PWM.addInstance();
  20. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  21. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig");
  22. /**
  23. * Write custom configuration values to the imported modules.
  24. */
  25. GPIO1.$name = "GPIO_Battery_Charging";
  26. GPIO1.port = "PORTB";
  27. GPIO1.associatedPins[0].$name = "PIN_PB6";
  28. const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
  29. Board.peripheral.$assign = "DEBUGSS";
  30. Board.peripheral.swclkPin.$assign = "PA20";
  31. Board.peripheral.swdioPin.$assign = "PA19";
  32. GPIO2.$name = "GPIO_Battery_Discharging";
  33. GPIO2.port = "PORTB";
  34. GPIO2.associatedPins[0].$name = "PIN_PB7";
  35. GPIO3.port = "PORTA";
  36. GPIO3.$name = "GPIO_ADDR_PINS";
  37. GPIO3.associatedPins.create(4);
  38. GPIO3.associatedPins[0].$name = "ADDR_0";
  39. GPIO3.associatedPins[0].direction = "INPUT";
  40. GPIO3.associatedPins[0].pin.$assign = "PA14";
  41. GPIO3.associatedPins[1].$name = "ADDR_1";
  42. GPIO3.associatedPins[1].direction = "INPUT";
  43. GPIO3.associatedPins[1].pin.$assign = "PA15";
  44. GPIO3.associatedPins[2].$name = "ADDR_2";
  45. GPIO3.associatedPins[2].direction = "INPUT";
  46. GPIO3.associatedPins[2].pin.$assign = "PA16";
  47. GPIO3.associatedPins[3].$name = "ADDR_3";
  48. GPIO3.associatedPins[3].direction = "INPUT";
  49. GPIO3.associatedPins[3].pin.$assign = "PA17";
  50. I2C1.$name = "I2C_0";
  51. I2C1.basicEnableTarget = true;
  52. I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
  53. I2C1.basicTargetAddress = 0x20;
  54. I2C1.peripheral.$assign = "I2C0";
  55. I2C1.peripheral.sdaPin.$assign = "PA0";
  56. I2C1.peripheral.sclPin.$assign = "PA1";
  57. I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  58. I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  59. I2C2.$name = "I2C_1";
  60. I2C2.basicEnableController = true;
  61. I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
  62. I2C2.peripheral.$assign = "I2C1";
  63. I2C2.peripheral.sdaPin.$assign = "PA3";
  64. I2C2.peripheral.sclPin.$assign = "PA4";
  65. I2C2.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  66. I2C2.sdaPinConfig.enableConfig = true;
  67. I2C2.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  68. I2C2.sclPinConfig.enableConfig = true;
  69. PWM1.$name = "PWM_0";
  70. PWM1.timerCount = 320;
  71. PWM1.timerStartTimer = true;
  72. PWM1.ccIndex = [0];
  73. PWM1.peripheral.ccp0Pin.$assign = "PA5";
  74. PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
  75. PWM1.PWM_CHANNEL_0.invert = true;
  76. PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  77. SYSCTL.peripheral.$assign = "SYSCTL";
  78. ProjectConfig.migrationCondition = true;
  79. /**
  80. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  81. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  82. * re-solve from scratch.
  83. */
  84. GPIO1.associatedPins[0].pin.$suggestSolution = "PB3";
  85. GPIO2.associatedPins[0].pin.$suggestSolution = "PB2";
  86. PWM1.peripheral.$suggestSolution = "TIMG0";