segment_main.syscfg 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  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 "VSSOP-28(DGS28)" --product "mspm0_sdk@2.02.00.05"
  5. * @v2CliArgs --device "MSPM0G3507" --package "VSSOP-28(DGS28)" --product "mspm0_sdk@2.02.00.05"
  6. * @versions {"tool":"1.21.0+3721"}
  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 GPIO = scripting.addModule("/ti/driverlib/GPIO", {}, false);
  14. const GPIO1 = GPIO.addInstance();
  15. const MATHACL = scripting.addModule("/ti/driverlib/MATHACL");
  16. const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
  17. const MCAN1 = MCAN.addInstance();
  18. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  19. /**
  20. * Write custom configuration values to the imported modules.
  21. */
  22. const mux4 = system.clockTree["EXHFMUX"];
  23. mux4.inputSelect = "EXHFMUX_XTAL";
  24. const pinFunction3 = system.clockTree["HFCLKEXT"];
  25. pinFunction3.inputFreq = 40;
  26. const pinFunction4 = system.clockTree["HFXT"];
  27. pinFunction4.enable = true;
  28. pinFunction4.HFXTStartup = 10;
  29. pinFunction4.HFCLKMonitor = true;
  30. pinFunction4.inputFreq = 40;
  31. ADC121.$name = "ADC12_0";
  32. ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_2";
  33. ADC121.samplingOperationMode = "sequence";
  34. ADC121.endAdd = 2;
  35. ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_3";
  36. ADC121.adcMem2chansel = "DL_ADC12_INPUT_CHAN_7";
  37. ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
  38. ADC121.peripheral.$assign = "ADC0";
  39. ADC121.peripheral.adcPin2.$assign = "PA25";
  40. ADC121.peripheral.adcPin3.$assign = "PA24";
  41. ADC121.peripheral.adcPin7.$assign = "PA22";
  42. ADC121.adcPin2Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  43. ADC121.adcPin3Config.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  44. ADC121.adcPin7Config.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  45. const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
  46. Board.peripheral.$assign = "DEBUGSS";
  47. Board.peripheral.swclkPin.$assign = "PA20";
  48. Board.peripheral.swdioPin.$assign = "PA19";
  49. GPIO1.$name = "GPIO_MULTIPLEXER_PIN_CONFIG";
  50. GPIO1.associatedPins.create(5);
  51. GPIO1.associatedPins[0].$name = "PIN_E1";
  52. GPIO1.associatedPins[0].pin.$assign = "PA9";
  53. GPIO1.associatedPins[1].$name = "PIN_S0";
  54. GPIO1.associatedPins[1].pin.$assign = "PA23";
  55. GPIO1.associatedPins[2].$name = "PIN_S1";
  56. GPIO1.associatedPins[2].pin.$assign = "PA4";
  57. GPIO1.associatedPins[3].$name = "PIN_S2";
  58. GPIO1.associatedPins[3].pin.$assign = "PA3";
  59. GPIO1.associatedPins[4].$name = "PIN_E0";
  60. GPIO1.associatedPins[4].pin.$assign = "PA11";
  61. MCAN1.$name = "MCAN0";
  62. MCAN1.wkupReqEnable = true;
  63. MCAN1.autoWkupEnable = true;
  64. MCAN1.emulationEnable = true;
  65. MCAN1.additionalCoreConfig = true;
  66. MCAN1.rrfe = true;
  67. MCAN1.rrfs = true;
  68. MCAN1.anfe = "1";
  69. MCAN1.anfs = "1";
  70. MCAN1.overrideRetention = true;
  71. MCAN1.enableInterrupt = true;
  72. MCAN1.interruptFlags = ["DL_MCAN_INTERRUPT_ARA","DL_MCAN_INTERRUPT_BEU","DL_MCAN_INTERRUPT_BO","DL_MCAN_INTERRUPT_DRX","DL_MCAN_INTERRUPT_ELO","DL_MCAN_INTERRUPT_EP","DL_MCAN_INTERRUPT_EW","DL_MCAN_INTERRUPT_MRAF","DL_MCAN_INTERRUPT_PEA","DL_MCAN_INTERRUPT_PED","DL_MCAN_INTERRUPT_RF0N","DL_MCAN_INTERRUPT_TC","DL_MCAN_INTERRUPT_TEFN","DL_MCAN_INTERRUPT_TOO","DL_MCAN_INTERRUPT_TSW","DL_MCAN_INTERRUPT_WDI"];
  73. MCAN1.interruptLine = ["DL_MCAN_INTR_LINE_NUM_1"];
  74. MCAN1.interruptLine1Flag = ["DL_MCAN_INTR_MASK_ALL"];
  75. MCAN1.m0interrupts = ["DL_MCAN_MSP_INTERRUPT_LINE1"];
  76. MCAN1.lss = 2;
  77. MCAN1.stdFiltElem = "001";
  78. MCAN1.stdFiltType = "01";
  79. MCAN1.stdFiltID1 = 3;
  80. MCAN1.stdFiltID2 = 4;
  81. MCAN1.flesa = 0;
  82. MCAN1.lse = 0;
  83. MCAN1.txEventFIFOWaterMark = 0;
  84. MCAN1.rxFIFO0waterMark = 0;
  85. MCAN1.rxBufElemSize = "DL_MCAN_ELEM_SIZE_32BYTES";
  86. MCAN1.rxFIFO0ElemSize = "DL_MCAN_ELEM_SIZE_32BYTES";
  87. MCAN1.rxFIFO1ElemSize = "DL_MCAN_ELEM_SIZE_32BYTES";
  88. MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  89. MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  90. SYSCTL.CANCLKSource = "HFCLK";
  91. SYSCTL.useHFCLK_Manual = true;
  92. SYSCTL.HFCLKSource = "HFXT";
  93. SYSCTL.HFCLK_Freq = 48000000;
  94. SYSCTL.HFCLKMonitor = true;
  95. SYSCTL.HFXTStartup = 10;
  96. SYSCTL.forceDefaultClkConfig = true;
  97. SYSCTL.clockTreeEn = true;
  98. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig", {}, false);
  99. ProjectConfig.migrationCondition = true;
  100. /**
  101. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  102. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  103. * re-solve from scratch.
  104. */
  105. pinFunction4.peripheral.$suggestSolution = "SYSCTL";
  106. pinFunction4.peripheral.hfxInPin.$suggestSolution = "PA5";
  107. pinFunction4.peripheral.hfxOutPin.$suggestSolution = "PA6";
  108. MCAN1.peripheral.$suggestSolution = "CANFD0";
  109. MCAN1.peripheral.rxPin.$suggestSolution = "PA27";
  110. MCAN1.peripheral.txPin.$suggestSolution = "PA26";