i2c_controller.syscfg 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 Board = scripting.addModule("/ti/driverlib/Board");
  12. const CRC = scripting.addModule("/ti/driverlib/CRC");
  13. const I2C = scripting.addModule("/ti/driverlib/I2C", {}, false);
  14. const I2C1 = I2C.addInstance();
  15. /**
  16. * Write custom configuration values to the imported modules.
  17. */
  18. CRC.polynomial = "16_POLYNOMIAL";
  19. CRC.seed = 0xFFFF;
  20. I2C1.basicEnableController = true;
  21. I2C1.advControllerTXFIFOTRIG = "BYTES_1";
  22. I2C1.advAnalogGlitchFilter = "DISABLED";
  23. I2C1.intController = ["ARBITRATION_LOST","NACK","RXFIFO_TRIGGER","RX_DONE","TX_DONE"];
  24. I2C1.$name = "I2C_controller";
  25. I2C1.peripheral.sdaPin.$assign = "PB3";
  26. I2C1.peripheral.sclPin.$assign = "PB2";
  27. I2C1.sdaPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric0";
  28. I2C1.sdaPinConfig.hideOutputInversion = scripting.forceWrite(false);
  29. I2C1.sdaPinConfig.onlyInternalResistor = scripting.forceWrite(false);
  30. I2C1.sdaPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  31. I2C1.sdaPinConfig.enableConfig = true;
  32. I2C1.sdaPinConfig.internalResistor = "PULL_UP";
  33. I2C1.sclPinConfig.$name = "ti_driverlib_gpio_GPIOPinGeneric1";
  34. I2C1.sclPinConfig.hideOutputInversion = scripting.forceWrite(false);
  35. I2C1.sclPinConfig.onlyInternalResistor = scripting.forceWrite(false);
  36. I2C1.sclPinConfig.passedPeripheralType = scripting.forceWrite("Digital");
  37. I2C1.sclPinConfig.enableConfig = true;
  38. I2C1.sclPinConfig.internalResistor = "PULL_UP";
  39. const SYSCTL = scripting.addModule("/ti/driverlib/SYSCTL", {}, false);
  40. SYSCTL.forceDefaultClkConfig = true;
  41. SYSCTL.clockTreeEn = true;
  42. /**
  43. * Pinmux solution for unlocked pins/peripherals. This ensures that minor changes to the automatic solver in a future
  44. * version of the tool will not impact the pinmux you originally saw. These lines can be completely deleted in order to
  45. * re-solve from scratch.
  46. */
  47. Board.peripheral.$suggestSolution = "DEBUGSS";
  48. Board.peripheral.swclkPin.$suggestSolution = "PA20";
  49. Board.peripheral.swdioPin.$suggestSolution = "PA19";
  50. I2C1.peripheral.$suggestSolution = "I2C1";