pin_mux.c 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. * Copyright 2020-2021 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 v9.0
  15. processor: MIMXRT1176xxxxx
  16. package_id: MIMXRT1176DVMAA
  17. mcu_data: ksdk2_0
  18. processor_version: 0.9.6
  19. * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
  20. */
  21. #include "fsl_common.h"
  22. #include "fsl_iomuxc.h"
  23. #include "pin_mux.h"
  24. /* FUNCTION ************************************************************************************************************
  25. *
  26. * Function Name : BOARD_InitBootPins
  27. * Description : Calls initialization functions.
  28. *
  29. * END ****************************************************************************************************************/
  30. void BOARD_InitBootPins(void) {
  31. BOARD_InitPins();
  32. }
  33. /*
  34. * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
  35. BOARD_InitPins:
  36. - options: {callFromInitBoot: 'true', coreID: cm7, enableClock: 'true'}
  37. - pin_list:
  38. - {pin_num: M15, peripheral: LPUART1, signal: RXD, pin_signal: GPIO_AD_25, software_input_on: Disable, pull_up_down_config: Pull_Down, pull_keeper_select: Keeper,
  39. open_drain: Disable, drive_strength: High, slew_rate: Slow}
  40. - {pin_num: L13, peripheral: LPUART1, signal: TXD, pin_signal: GPIO_AD_24, software_input_on: Disable, pull_up_down_config: Pull_Down, pull_keeper_select: Keeper,
  41. open_drain: Disable, drive_strength: High, slew_rate: Slow}
  42. - {pin_num: D6, peripheral: ARM, signal: arm_trace_swo, pin_signal: GPIO_DISP_B2_07, software_input_on: Disable, pull_up_down_config: Pull_Down, pull_keeper_select: Keeper,
  43. open_drain: Disable, drive_strength: High, slew_rate: Slow}
  44. * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
  45. */
  46. /* FUNCTION ************************************************************************************************************
  47. *
  48. * Function Name : BOARD_InitPins, assigned for the Cortex-M7F core.
  49. * Description : Configures pin routing and optionally pin electrical features.
  50. *
  51. * END ****************************************************************************************************************/
  52. void BOARD_InitPins(void) {
  53. CLOCK_EnableClock(kCLOCK_Iomuxc); /* LPCG on: LPCG is ON. */
  54. IOMUXC_SetPinMux(
  55. IOMUXC_GPIO_AD_24_LPUART1_TXD, /* GPIO_AD_24 is configured as LPUART1_TXD */
  56. 0U); /* Software Input On Field: Input Path is determined by functionality */
  57. IOMUXC_SetPinMux(
  58. IOMUXC_GPIO_AD_25_LPUART1_RXD, /* GPIO_AD_25 is configured as LPUART1_RXD */
  59. 0U); /* Software Input On Field: Input Path is determined by functionality */
  60. IOMUXC_SetPinMux(
  61. IOMUXC_GPIO_DISP_B2_07_ARM_TRACE_SWO, /* GPIO_DISP_B2_07 is configured as ARM_TRACE_SWO */
  62. 0U); /* Software Input On Field: Input Path is determined by functionality */
  63. IOMUXC_SetPinConfig(
  64. IOMUXC_GPIO_AD_24_LPUART1_TXD, /* GPIO_AD_24 PAD functional properties : */
  65. 0x02U); /* Slew Rate Field: Slow Slew Rate
  66. Drive Strength Field: high drive strength
  67. Pull / Keep Select Field: Pull Disable, Highz
  68. Pull Up / Down Config. Field: Weak pull down
  69. Open Drain Field: Disabled
  70. Domain write protection: Both cores are allowed
  71. Domain write protection lock: Neither of DWP bits is locked */
  72. IOMUXC_SetPinConfig(
  73. IOMUXC_GPIO_AD_25_LPUART1_RXD, /* GPIO_AD_25 PAD functional properties : */
  74. 0x02U); /* Slew Rate Field: Slow Slew Rate
  75. Drive Strength Field: high drive strength
  76. Pull / Keep Select Field: Pull Disable, Highz
  77. Pull Up / Down Config. Field: Weak pull down
  78. Open Drain Field: Disabled
  79. Domain write protection: Both cores are allowed
  80. Domain write protection lock: Neither of DWP bits is locked */
  81. IOMUXC_SetPinConfig(
  82. IOMUXC_GPIO_DISP_B2_07_ARM_TRACE_SWO, /* GPIO_DISP_B2_07 PAD functional properties : */
  83. 0x02U); /* Slew Rate Field: Slow Slew Rate
  84. Drive Strength Field: high drive strength
  85. Pull / Keep Select Field: Pull Disable, Highz
  86. Pull Up / Down Config. Field: Weak pull down
  87. Open Drain Field: Disabled
  88. Domain write protection: Both cores are allowed
  89. Domain write protection lock: Neither of DWP bits is locked */
  90. }
  91. /***********************************************************************************************************************
  92. * EOF
  93. **********************************************************************************************************************/