segment_main.syscfg 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  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 GPIO2 = GPIO.addInstance();
  16. const GPIO3 = GPIO.addInstance();
  17. const GPIO4 = GPIO.addInstance();
  18. const MATHACL = scripting.addModule("/ti/driverlib/MATHACL");
  19. const MCAN = scripting.addModule("/ti/driverlib/MCAN", {}, false);
  20. const MCAN1 = MCAN.addInstance();
  21. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL");
  22. /**
  23. * Write custom configuration values to the imported modules.
  24. */
  25. const multiplier2 = system.clockTree["PLL_QDIV"];
  26. multiplier2.multiplyValue = 5;
  27. const mux2 = system.clockTree["CANCLKMUX"];
  28. mux2.inputSelect = "CANCLKMUX_PLLCLK1_OUT";
  29. const pinFunction3 = system.clockTree["HFCLKEXT"];
  30. pinFunction3.inputFreq = 40;
  31. const pinFunction4 = system.clockTree["HFXT"];
  32. pinFunction4.HFXTStartup = 10;
  33. pinFunction4.HFCLKMonitor = true;
  34. pinFunction4.inputFreq = 40;
  35. ADC121.$name = "ADC12_0";
  36. ADC121.adcMem0chansel = "DL_ADC12_INPUT_CHAN_2";
  37. ADC121.samplingOperationMode = "sequence";
  38. ADC121.endAdd = 2;
  39. ADC121.adcMem1chansel = "DL_ADC12_INPUT_CHAN_3";
  40. ADC121.adcMem2chansel = "DL_ADC12_INPUT_CHAN_7";
  41. ADC121.sampClkDiv = "DL_ADC12_CLOCK_DIVIDE_8";
  42. ADC121.enabledInterrupts = ["DL_ADC12_INTERRUPT_MEM2_RESULT_LOADED"];
  43. ADC121.peripheral.$assign = "ADC0";
  44. ADC121.peripheral.adcPin2.$assign = "PA25";
  45. ADC121.peripheral.adcPin3.$assign = "PA24";
  46. ADC121.peripheral.adcPin7.$assign = "PA22";
  47. ADC121.adcPin2Config.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  48. ADC121.adcPin3Config.$name = "ti_driverlib_gpio_GPIOPinGeneric2";
  49. ADC121.adcPin7Config.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  50. const Board = scripting.addModule("/ti/driverlib/Board", {}, false);
  51. Board.peripheral.$assign = "DEBUGSS";
  52. Board.peripheral.swclkPin.$assign = "PA20";
  53. Board.peripheral.swdioPin.$assign = "PA19";
  54. GPIO1.$name = "GPIO_MULTIPLEXER_PIN_CONFIG";
  55. GPIO1.associatedPins.create(5);
  56. GPIO1.associatedPins[0].$name = "PIN_E1";
  57. GPIO1.associatedPins[0].pin.$assign = "PA9";
  58. GPIO1.associatedPins[1].$name = "PIN_S0";
  59. GPIO1.associatedPins[1].pin.$assign = "PA5";
  60. GPIO1.associatedPins[2].$name = "PIN_S1";
  61. GPIO1.associatedPins[2].pin.$assign = "PA4";
  62. GPIO1.associatedPins[3].$name = "PIN_S2";
  63. GPIO1.associatedPins[3].pin.$assign = "PA3";
  64. GPIO1.associatedPins[4].$name = "PIN_E0";
  65. GPIO1.associatedPins[4].pin.$assign = "PA6";
  66. GPIO2.$name = "GPIO_SHIFT_REGISTER_PIN_CONFIG";
  67. GPIO2.associatedPins.create(5);
  68. GPIO2.associatedPins[0].$name = "PIN_SER";
  69. GPIO2.associatedPins[0].pin.$assign = "PA11";
  70. GPIO2.associatedPins[1].$name = "PIN_OE";
  71. GPIO2.associatedPins[1].pin.$assign = "PA14";
  72. GPIO2.associatedPins[2].$name = "PIN_RCLK";
  73. GPIO2.associatedPins[2].pin.$assign = "PA15";
  74. GPIO2.associatedPins[3].$name = "PIN_SRCLK";
  75. GPIO2.associatedPins[3].pin.$assign = "PA16";
  76. GPIO2.associatedPins[4].$name = "PIN_SRCLR";
  77. GPIO2.associatedPins[4].pin.$assign = "PA17";
  78. GPIO3.$name = "GPIO_BRIDGE_SEGMENT";
  79. GPIO3.associatedPins[0].$name = "PIN_BRIDGE_SEGMENT";
  80. GPIO3.associatedPins[0].pin.$assign = "PA10";
  81. GPIO4.$name = "GPIO_PIN_FOR_CAN_COMMUNICATION";
  82. GPIO4.associatedPins.create(2);
  83. GPIO4.associatedPins[0].direction = "INPUT";
  84. GPIO4.associatedPins[0].$name = "PIN_DISCOVERY_IN";
  85. GPIO4.associatedPins[0].pin.$assign = "PA0";
  86. GPIO4.associatedPins[1].$name = "PIN_DISCOVERY_OUT";
  87. GPIO4.associatedPins[1].pin.$assign = "PA1";
  88. MCAN1.$name = "MCAN0";
  89. MCAN1.wkupReqEnable = true;
  90. MCAN1.autoWkupEnable = true;
  91. MCAN1.emulationEnable = true;
  92. MCAN1.additionalCoreConfig = true;
  93. MCAN1.rrfe = true;
  94. MCAN1.rrfs = true;
  95. MCAN1.anfe = "1";
  96. MCAN1.anfs = "1";
  97. MCAN1.overrideRetention = true;
  98. MCAN1.enableInterrupt = true;
  99. 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"];
  100. MCAN1.interruptLine = ["DL_MCAN_INTR_LINE_NUM_1"];
  101. MCAN1.interruptLine1Flag = ["DL_MCAN_INTR_MASK_ALL"];
  102. MCAN1.m0interrupts = ["DL_MCAN_MSP_INTERRUPT_LINE1"];
  103. MCAN1.lss = 2;
  104. MCAN1.stdFiltElem = "001";
  105. MCAN1.stdFiltType = "01";
  106. MCAN1.stdFiltID1 = 3;
  107. MCAN1.stdFiltID2 = 4;
  108. MCAN1.flesa = 0;
  109. MCAN1.lse = 0;
  110. MCAN1.txEventFIFOWaterMark = 0;
  111. MCAN1.rxFIFO0waterMark = 0;
  112. MCAN1.rxBufElemSize = "DL_MCAN_ELEM_SIZE_32BYTES";
  113. MCAN1.rxFIFO0ElemSize = "DL_MCAN_ELEM_SIZE_32BYTES";
  114. MCAN1.rxFIFO1ElemSize = "DL_MCAN_ELEM_SIZE_32BYTES";
  115. MCAN1.txPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric3";
  116. MCAN1.rxPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric4";
  117. SYSCTL.CANCLKSource = "HFCLK";
  118. SYSCTL.HFCLKSource = "HFXT";
  119. SYSCTL.HFCLK_Freq = 48000000;
  120. SYSCTL.HFCLKMonitor = true;
  121. SYSCTL.HFXTStartup = 10;
  122. SYSCTL.forceDefaultClkConfig = true;
  123. SYSCTL.clockTreeEn = true;
  124. const ProjectConfig = scripting.addModule("/ti/project_config/ProjectConfig", {}, false);
  125. ProjectConfig.migrationCondition = true;
  126. /**
  127. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  128. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  129. * re-solve from scratch.
  130. */
  131. MCAN1.peripheral.$suggestSolution = "CANFD0";
  132. MCAN1.peripheral.rxPin.$suggestSolution = "PA27";
  133. MCAN1.peripheral.txPin.$suggestSolution = "PA26";