pin_mux.c 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. /*
  2. * Copyright 2018-2019 NXP
  3. * All rights reserved.
  4. *
  5. * SPDX-License-Identifier: BSD-3-Clause
  6. */
  7. /***********************************************************************************************************************
  8. * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
  9. * will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
  10. **********************************************************************************************************************/
  11. /*
  12. * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
  13. !!GlobalInfo
  14. product: Pins v5.0
  15. processor: MIMXRT1021xxxxx
  16. package_id: MIMXRT1021DAG5A
  17. mcu_data: ksdk2_0
  18. processor_version: 5.0.1
  19. board: MIMXRT1020-EVK
  20. power_domains: {NVCC_GPIO: '3.3'}
  21. * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
  22. */
  23. #include "fsl_common.h"
  24. #include "fsl_iomuxc.h"
  25. #include "pin_mux.h"
  26. /* FUNCTION ************************************************************************************************************
  27. *
  28. * Function Name : BOARD_InitBootPins
  29. * Description : Calls initialization functions.
  30. *
  31. * END ****************************************************************************************************************/
  32. void BOARD_InitBootPins(void) {
  33. BOARD_InitPins();
  34. }
  35. /*
  36. * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
  37. BOARD_InitPins:
  38. - options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
  39. - pin_list:
  40. - {pin_num: '101', peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_07, software_input_on: Disable, open_drain: Disable}
  41. - {pin_num: '105', peripheral: LPUART1, signal: TX, pin_signal: GPIO_AD_B0_06, software_input_on: Disable, open_drain: Disable}
  42. * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
  43. */
  44. /* FUNCTION ************************************************************************************************************
  45. *
  46. * Function Name : BOARD_InitPins
  47. * Description : Configures pin routing and optionally pin electrical features.
  48. *
  49. * END ****************************************************************************************************************/
  50. void BOARD_InitPins(void) {
  51. CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03U */
  52. IOMUXC_SetPinMux(
  53. IOMUXC_GPIO_AD_B0_05_GPIO1_IO05, /* GPIO_AD_B0_05 is configured as GPIO1_IO05 */
  54. 0U); /* Software Input On Field: Input Path is determined by functionality */
  55. IOMUXC_SetPinConfig(
  56. IOMUXC_GPIO_AD_B0_05_GPIO1_IO05, /* GPIO_AD_B0_05 PAD functional properties : */
  57. 0x10B0U); /* Slew Rate Field: Slow Slew Rate
  58. Drive Strength Field: R0/6
  59. Speed Field: medium(100MHz)
  60. Open Drain Enable Field: Open Drain Disabled
  61. Pull / Keep Enable Field: Pull/Keeper Enabled
  62. Pull / Keep Select Field: Keeper
  63. Pull Up / Down Config. Field: 100K Ohm Pull Down
  64. Hyst. Enable Field: Hysteresis Disabled */
  65. IOMUXC_SetPinMux(
  66. IOMUXC_GPIO_AD_B0_06_LPUART1_TX, /* GPIO_AD_B0_06 is configured as LPUART1_TX */
  67. 0U); /* Software Input On Field: Input Path is determined by functionality */
  68. IOMUXC_SetPinMux(
  69. IOMUXC_GPIO_AD_B0_07_LPUART1_RX, /* GPIO_AD_B0_07 is configured as LPUART1_RX */
  70. 0U); /* Software Input On Field: Input Path is determined by functionality */
  71. IOMUXC_SetPinConfig(
  72. IOMUXC_GPIO_AD_B0_06_LPUART1_TX, /* GPIO_AD_B0_06 PAD functional properties : */
  73. 0x10B0U); /* Slew Rate Field: Slow Slew Rate
  74. Drive Strength Field: R0/6
  75. Speed Field: medium(100MHz)
  76. Open Drain Enable Field: Open Drain Disabled
  77. Pull / Keep Enable Field: Pull/Keeper Enabled
  78. Pull / Keep Select Field: Keeper
  79. Pull Up / Down Config. Field: 100K Ohm Pull Down
  80. Hyst. Enable Field: Hysteresis Disabled */
  81. IOMUXC_SetPinConfig(
  82. IOMUXC_GPIO_AD_B0_07_LPUART1_RX, /* GPIO_AD_B0_07 PAD functional properties : */
  83. 0x10B0U); /* Slew Rate Field: Slow Slew Rate
  84. Drive Strength Field: R0/6
  85. Speed Field: medium(100MHz)
  86. Open Drain Enable Field: Open Drain Disabled
  87. Pull / Keep Enable Field: Pull/Keeper Enabled
  88. Pull / Keep Select Field: Keeper
  89. Pull Up / Down Config. Field: 100K Ohm Pull Down
  90. Hyst. Enable Field: Hysteresis Disabled */
  91. }
  92. /***********************************************************************************************************************
  93. * EOF
  94. **********************************************************************************************************************/