main.syscfg 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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-64(PM)" --product "mspm0_sdk@2.03.00.08"
  5. * @v2CliArgs --device "MSPM0G3507" --package "LQFP-64(PM)" --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.create(2);
  28. GPIO1.associatedPins[0].$name = "PIN_PB0";
  29. GPIO1.associatedPins[0].pin.$assign = "PB0";
  30. GPIO1.associatedPins[1].$name = "PIN_PB4";
  31. GPIO1.associatedPins[1].pin.$assign = "PB4";
  32. const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
  33. GPIO2.$name = "GPIO_Battery_Discharging";
  34. GPIO2.port = "PORTB";
  35. GPIO2.associatedPins.create(2);
  36. GPIO2.associatedPins[0].$name = "PIN_PB8";
  37. GPIO2.associatedPins[0].pin.$assign = "PB8";
  38. GPIO2.associatedPins[1].$name = "PIN_PB12";
  39. GPIO2.associatedPins[1].pin.$assign = "PB12";
  40. GPIO3.$name = "PWM_GPIO";
  41. GPIO3.associatedPins[0].$name = "PIN_GPIO";
  42. GPIO3.associatedPins[0].pin.$assign = "PA5";
  43. I2C1.$name = "I2C_0";
  44. I2C1.basicEnableTarget = true;
  45. I2C1.intTarget = ["RXFIFO_TRIGGER","RX_DONE","START","STOP","TXFIFO_TRIGGER","TX_DONE"];
  46. I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  47. I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  48. I2C2.$name = "I2C_1";
  49. I2C2.basicEnableController = true;
  50. I2C2.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TXFIFO_TRIGGER","TX_DONE"];
  51. I2C2.peripheral.sdaPin.$assign = "PA3";
  52. I2C2.peripheral.sclPin.$assign = "PA4";
  53. I2C2.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  54. I2C2.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  55. PWM1.$name = "PWM_0";
  56. PWM1.timerCount = 320;
  57. PWM1.timerStartTimer = true;
  58. PWM1.ccIndex = [0];
  59. PWM1.peripheral.ccp0Pin.$assign = "PA0";
  60. PWM1.PWM_CHANNEL_0.$name = "ti_driverlib_pwm_PWMTimerCC0";
  61. PWM1.ccp0PinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  62. ProjectConfig.deviceSpin = "MSPM0G3507";
  63. /**
  64. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  65. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  66. * re-solve from scratch.
  67. */
  68. Board.peripheral.$suggestSolution = "DEBUGSS";
  69. Board.peripheral.swclkPin.$suggestSolution = "PA20";
  70. Board.peripheral.swdioPin.$suggestSolution = "PA19";
  71. I2C1.peripheral.$suggestSolution = "I2C0";
  72. I2C1.peripheral.sdaPin.$suggestSolution = "PA10";
  73. I2C1.peripheral.sclPin.$suggestSolution = "PA1";
  74. I2C2.peripheral.$suggestSolution = "I2C1";
  75. PWM1.peripheral.$suggestSolution = "TIMA0";
  76. SYSCTL.peripheral.$suggestSolution = "SYSCTL";