ISSDK  1.8
IoT Sensing Software Development Kit
pin_mux.c
Go to the documentation of this file.
1 /*
2  * Copyright 2017 NXP
3  * All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 
9 /*
10  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
11 !!GlobalInfo
12 product: Pins v3.0
13 processor: MIMXRT1052xxx6A
14 package_id: MIMXRT1052DVL6A
15 mcu_data: i_mx_1_0
16 processor_version: 0.0.1
17  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
18  */
19 
20 #include "fsl_common.h"
21 #include "fsl_iomuxc.h"
22 #include "pin_mux.h"
23 
24 /*
25  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
26 BOARD_InitPins:
27 - options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
28 - pin_list:
29  - {pin_num: L14, peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_13, slew_rate: Slow, software_input_on: Disable, open_drain: Disable, speed: MHZ_100, drive_strength: R0_6,
30  pull_keeper_select: Keeper, pull_keeper_enable: Enable, pull_up_down_config: Pull_Down_100K_Ohm, hysteresis_enable: Disable}
31  - {pin_num: K14, peripheral: LPUART1, signal: TX, pin_signal: GPIO_AD_B0_12, slew_rate: Slow, software_input_on: Disable, open_drain: Disable, speed: MHZ_100, drive_strength: R0_6,
32  pull_keeper_select: Keeper, pull_keeper_enable: Enable, pull_up_down_config: Pull_Down_100K_Ohm, hysteresis_enable: Disable}
33  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
34  */
35 
36 /*FUNCTION**********************************************************************
37  *
38  * Function Name : BOARD_InitPins
39  * Description : Configures pin routing and optionally pin electrical features.
40  *
41  *END**************************************************************************/
42 void BOARD_InitPins(void) {
43  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
44 
45  IOMUXC_SetPinMux(
46  IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 is configured as LPUART1_TX */
47  0U); /* Software Input On Field: Input Path is determined by functionality */
48  IOMUXC_SetPinMux(
49  IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 is configured as LPUART1_RX */
50  0U); /* Software Input On Field: Input Path is determined by functionality */
51  IOMUXC_SetPinConfig(
52  IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 PAD functional properties : */
53  0x10B0u); /* Slew Rate Field: Slow Slew Rate
54  Drive Strength Field: R0/6
55  Speed Field: medium(100MHz)
56  Open Drain Enable Field: Open Drain Disabled
57  Pull / Keep Enable Field: Pull/Keeper Enabled
58  Pull / Keep Select Field: Keeper
59  Pull Up / Down Config. Field: 100K Ohm Pull Down
60  Hyst. Enable Field: Hysteresis Disabled */
61  IOMUXC_SetPinConfig(
62  IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 PAD functional properties : */
63  0x10B0u); /* Slew Rate Field: Slow Slew Rate
64  Drive Strength Field: R0/6
65  Speed Field: medium(100MHz)
66  Open Drain Enable Field: Open Drain Disabled
67  Pull / Keep Enable Field: Pull/Keeper Enabled
68  Pull / Keep Select Field: Keeper
69  Pull Up / Down Config. Field: 100K Ohm Pull Down
70  Hyst. Enable Field: Hysteresis Disabled */
71  IOMUXC_SetPinMux(
72  IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, /* GPIO_AD_B0_09 is configured as GPIO1_IO09 */
73  0U);
74  IOMUXC_SetPinConfig(
75  IOMUXC_GPIO_AD_B0_09_GPIO1_IO09, /* GPIO_AD_B0_09 PAD functional properties : */
76  0xB0A9u); /* Slew Rate Field: Slow Slew Rate
77  Drive Strength Field: R0/6
78  Speed Field: medium(100MHz)
79  Open Drain Enable Field: Open Drain Disabled
80  Pull / Keep Enable Field: Pull/Keeper Enabled
81  Pull / Keep Select Field: Keeper
82  Pull Up / Down Config. Field: 100K Ohm Pull Down
83  Hyst. Enable Field: Hysteresis Disabled */
84 
85  IOMUXC_SetPinMux(
86  IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, /* GPIO_AD_B0_10 is configured as GPIO1_IO10 */
87  0U);
88  IOMUXC_SetPinConfig(
89  IOMUXC_GPIO_AD_B0_10_GPIO1_IO10, /* GPIO_AD_B0_10 PAD functional properties : */
90  0xB0A9u); /* Slew Rate Field: Fast Slew Rate
91  Drive Strength Field: R0/5
92  Speed Field: medium(100MHz)
93  Open Drain Enable Field: Open Drain Disabled
94  Pull / Keep Enable Field: Pull/Keeper Enabled
95  Pull / Keep Select Field: Pull
96  Pull Up / Down Config. Field: 100K Ohm Pull Up
97  Hyst. Enable Field: Hysteresis Disabled */
98 
99  IOMUXC_SetPinMux(
100  IOMUXC_GPIO_AD_B0_11_GPIO1_IO11, /* GPIO_AD_B0_11 is configured as GPIO1_IO11 */
101  0U);
102  IOMUXC_SetPinConfig(
103  IOMUXC_GPIO_AD_B0_11_GPIO1_IO11, /* GPIO_AD_B0_11 PAD functional properties : */
104  0x10B0u); /* Slew Rate Field: Slow Slew Rate
105  Drive Strength Field: R0/6
106  Speed Field: medium(100MHz)
107  Open Drain Enable Field: Open Drain Disabled
108  Pull / Keep Enable Field: Pull/Keeper Enabled
109  Pull / Keep Select Field: Keeper
110  Pull Up / Down Config. Field: 100K Ohm Pull Down
111  Hyst. Enable Field: Hysteresis Disabled */
112 
113  IOMUXC_SetPinMux(
114  IOMUXC_GPIO_SD_B0_01_GPIO3_IO13, /* GPIO_SD_B0_01 is configured as GPIO3_IO13 */
115  0U);
116 }
117 
118 
119 /*
120  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
121 LPI2C1_InitPins:
122 - options: {coreID: core0, enableClock: 'true'}
123 - pin_list:
124  - {pin_num: J11, peripheral: LPI2C1, signal: SCL, pin_signal: GPIO_AD_B1_00, slew_rate: Slow, software_input_on: Enable, open_drain: Enable, speed: MHZ_100, drive_strength: R0_6,
125  pull_keeper_select: Keeper, pull_keeper_enable: Enable, pull_up_down_config: Pull_Up_22K_Ohm, hysteresis_enable: Disable}
126  - {pin_num: K11, peripheral: LPI2C1, signal: SDA, pin_signal: GPIO_AD_B1_01, slew_rate: Slow, software_input_on: Enable, open_drain: Enable, speed: MHZ_100, drive_strength: R0_6,
127  pull_keeper_select: Keeper, pull_keeper_enable: Enable, pull_up_down_config: Pull_Up_22K_Ohm, hysteresis_enable: Disable}
128  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
129  */
130 
131 /*FUNCTION**********************************************************************
132  *
133  * Function Name : LPI2C1_InitPins
134  * Description : Configures pin routing and optionally pin electrical features.
135  *
136  *END**************************************************************************/
137 void LPI2C1_InitPins(void) {
138  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
139 
140  IOMUXC_SetPinMux(
141  IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, /* GPIO_AD_B1_00 is configured as LPI2C1_SCL */
142  1U); /* Software Input On Field: Force input path of pad GPIO_AD_B1_00 */
143  IOMUXC_SetPinMux(
144  IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, /* GPIO_AD_B1_01 is configured as LPI2C1_SDA */
145  1U); /* Software Input On Field: Force input path of pad GPIO_AD_B1_01 */
146  IOMUXC_SetPinConfig(
147  IOMUXC_GPIO_AD_B1_00_LPI2C1_SCL, /* GPIO_AD_B1_00 PAD functional properties : */
148  0xD8B0u); /* Slew Rate Field: Slow Slew Rate
149  Drive Strength Field: R0/6
150  Speed Field: medium(100MHz)
151  Open Drain Enable Field: Open Drain Enabled
152  Pull / Keep Enable Field: Pull/Keeper Enabled
153  Pull / Keep Select Field: Keeper
154  Pull Up / Down Config. Field: 22K Ohm Pull Up
155  Hyst. Enable Field: Hysteresis Disabled */
156  IOMUXC_SetPinConfig(
157  IOMUXC_GPIO_AD_B1_01_LPI2C1_SDA, /* GPIO_AD_B1_01 PAD functional properties : */
158  0xD8B0u); /* Slew Rate Field: Slow Slew Rate
159  Drive Strength Field: R0/6
160  Speed Field: medium(100MHz)
161  Open Drain Enable Field: Open Drain Enabled
162  Pull / Keep Enable Field: Pull/Keeper Enabled
163  Pull / Keep Select Field: Keeper
164  Pull Up / Down Config. Field: 22K Ohm Pull Up
165  Hyst. Enable Field: Hysteresis Disabled */
166 }
167 
168 
169 /*
170  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
171 LPI2C1_DeinitPins:
172 - options: {coreID: core0, enableClock: 'true'}
173 - pin_list:
174  - {pin_num: J11, peripheral: GPIO1, signal: 'gpio_io, 16', pin_signal: GPIO_AD_B1_00}
175  - {pin_num: K11, peripheral: GPIO1, signal: 'gpio_io, 17', pin_signal: GPIO_AD_B1_01}
176  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
177  */
178 
179 /*FUNCTION**********************************************************************
180  *
181  * Function Name : LPI2C1_DeinitPins
182  * Description : Configures pin routing and optionally pin electrical features.
183  *
184  *END**************************************************************************/
185 void LPI2C1_DeinitPins(void) {
186  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
187 
188  IOMUXC_SetPinMux(
189  IOMUXC_GPIO_AD_B1_00_GPIO1_IO16, /* GPIO_AD_B1_00 is configured as GPIO1_IO16 */
190  0U); /* Software Input On Field: Input Path is determined by functionality */
191  IOMUXC_SetPinMux(
192  IOMUXC_GPIO_AD_B1_01_GPIO1_IO17, /* GPIO_AD_B1_01 is configured as GPIO1_IO17 */
193  0U); /* Software Input On Field: Input Path is determined by functionality */
194 }
195 
196 /*FUNCTION**********************************************************************
197  *
198  * Function Name : LPSPI1_InitPins
199  * Description : Configures pin routing and optionally pin electrical features.
200  *
201  *END**************************************************************************/
202 void LPSPI1_InitPins(void) {
203  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
204 
205  IOMUXC_SetPinMux(
206  IOMUXC_GPIO_SD_B0_00_LPSPI1_SCK, /* GPIO_SD_B0_00 is configured as LPSPI1_SCK */
207  0U); /* Software Input On Field: Input Path is determined by functionality */
208  IOMUXC_SetPinMux(
209  IOMUXC_GPIO_SD_B0_01_LPSPI1_PCS0, /* GPIO_SD_B0_01 is configured as LPSPI1_PCS0 */
210  0U); /* Software Input On Field: Input Path is determined by functionality */
211  IOMUXC_SetPinMux(
212  IOMUXC_GPIO_SD_B0_02_LPSPI1_SDO, /* GPIO_SD_B0_02 is configured as LPSPI1_SDO */
213  0U); /* Software Input On Field: Input Path is determined by functionality */
214  IOMUXC_SetPinMux(
215  IOMUXC_GPIO_SD_B0_03_LPSPI1_SDI, /* GPIO_SD_B0_03 is configured as LPSPI1_SDI */
216  0U); /* Software Input On Field: Input Path is determined by functionality */
217  IOMUXC_SetPinConfig(
218  IOMUXC_GPIO_SD_B0_00_LPSPI1_SCK, /* GPIO_SD_B0_00 PAD functional properties : */
219  0x10B0u); /* Slew Rate Field: Slow Slew Rate
220  Drive Strength Field: R0/6
221  Speed Field: medium(100MHz)
222  Open Drain Enable Field: Open Drain Disabled
223  Pull / Keep Enable Field: Pull/Keeper Enabled
224  Pull / Keep Select Field: Keeper
225  Pull Up / Down Config. Field: 100K Ohm Pull Down
226  Hyst. Enable Field: Hysteresis Disabled */
227  IOMUXC_SetPinConfig(
228  IOMUXC_GPIO_SD_B0_01_LPSPI1_PCS0, /* GPIO_SD_B0_01 PAD functional properties : */
229  0x10B0u); /* Slew Rate Field: Slow Slew Rate
230  Drive Strength Field: R0/6
231  Speed Field: medium(100MHz)
232  Open Drain Enable Field: Open Drain Disabled
233  Pull / Keep Enable Field: Pull/Keeper Enabled
234  Pull / Keep Select Field: Keeper
235  Pull Up / Down Config. Field: 100K Ohm Pull Down
236  Hyst. Enable Field: Hysteresis Disabled */
237  IOMUXC_SetPinConfig(
238  IOMUXC_GPIO_SD_B0_02_LPSPI1_SDO, /* GPIO_SD_B0_02 PAD functional properties : */
239  0x10B0u); /* Slew Rate Field: Slow Slew Rate
240  Drive Strength Field: R0/6
241  Speed Field: medium(100MHz)
242  Open Drain Enable Field: Open Drain Disabled
243  Pull / Keep Enable Field: Pull/Keeper Enabled
244  Pull / Keep Select Field: Keeper
245  Pull Up / Down Config. Field: 100K Ohm Pull Down
246  Hyst. Enable Field: Hysteresis Disabled */
247  IOMUXC_SetPinConfig(
248  IOMUXC_GPIO_SD_B0_03_LPSPI1_SDI, /* GPIO_SD_B0_03 PAD functional properties : */
249  0x10B0u); /* Slew Rate Field: Slow Slew Rate
250  Drive Strength Field: R0/6
251  Speed Field: medium(100MHz)
252  Open Drain Enable Field: Open Drain Disabled
253  Pull / Keep Enable Field: Pull/Keeper Enabled
254  Pull / Keep Select Field: Keeper
255  Pull Up / Down Config. Field: 100K Ohm Pull Down
256  Hyst. Enable Field: Hysteresis Disabled */
257 }
258 
259 
260 /*
261  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
262 LPSPI1_DeinitPins:
263 - options: {coreID: core0, enableClock: 'true'}
264 - pin_list:
265  - {pin_num: J4, peripheral: GPIO3, signal: 'gpio_io, 12', pin_signal: GPIO_SD_B0_00}
266  - {pin_num: J3, peripheral: GPIO3, signal: 'gpio_io, 13', pin_signal: GPIO_SD_B0_01}
267  - {pin_num: J1, peripheral: GPIO3, signal: 'gpio_io, 14', pin_signal: GPIO_SD_B0_02}
268  - {pin_num: K1, peripheral: GPIO3, signal: 'gpio_io, 15', pin_signal: GPIO_SD_B0_03}
269  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
270  */
271 
272 /*FUNCTION**********************************************************************
273  *
274  * Function Name : LPSPI1_DeinitPins
275  * Description : Configures pin routing and optionally pin electrical features.
276  *
277  *END**************************************************************************/
278 void LPSPI1_DeinitPins(void) {
279  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
280 
281  IOMUXC_SetPinMux(
282  IOMUXC_GPIO_SD_B0_00_GPIO3_IO12, /* GPIO_SD_B0_00 is configured as GPIO3_IO12 */
283  0U); /* Software Input On Field: Input Path is determined by functionality */
284  IOMUXC_SetPinMux(
285  IOMUXC_GPIO_SD_B0_01_GPIO3_IO13, /* GPIO_SD_B0_01 is configured as GPIO3_IO13 */
286  0U); /* Software Input On Field: Input Path is determined by functionality */
287  IOMUXC_SetPinMux(
288  IOMUXC_GPIO_SD_B0_02_GPIO3_IO14, /* GPIO_SD_B0_02 is configured as GPIO3_IO14 */
289  0U); /* Software Input On Field: Input Path is determined by functionality */
290  IOMUXC_SetPinMux(
291  IOMUXC_GPIO_SD_B0_03_GPIO3_IO15, /* GPIO_SD_B0_03 is configured as GPIO3_IO15 */
292  0U); /* Software Input On Field: Input Path is determined by functionality */
293 }
294 
295 /*FUNCTION**********************************************************************
296  *
297  * Function Name : LPUART1_InitPins
298  * Description : Configures pin routing and optionally pin electrical features.
299  *
300  *END**************************************************************************/
301 void LPUART1_InitPins(void) {
302  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
303 
304  IOMUXC_SetPinMux(
305  IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 is configured as LPUART1_TX */
306  0U); /* Software Input On Field: Input Path is determined by functionality */
307  IOMUXC_SetPinMux(
308  IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 is configured as LPUART1_RX */
309  0U); /* Software Input On Field: Input Path is determined by functionality */
310  IOMUXC_SetPinConfig(
311  IOMUXC_GPIO_AD_B0_12_LPUART1_TX, /* GPIO_AD_B0_12 PAD functional properties : */
312  0x10B0u); /* Slew Rate Field: Slow Slew Rate
313  Drive Strength Field: R0/6
314  Speed Field: medium(100MHz)
315  Open Drain Enable Field: Open Drain Disabled
316  Pull / Keep Enable Field: Pull/Keeper Enabled
317  Pull / Keep Select Field: Keeper
318  Pull Up / Down Config. Field: 100K Ohm Pull Down
319  Hyst. Enable Field: Hysteresis Disabled */
320  IOMUXC_SetPinConfig(
321  IOMUXC_GPIO_AD_B0_13_LPUART1_RX, /* GPIO_AD_B0_13 PAD functional properties : */
322  0x10B0u); /* Slew Rate Field: Slow Slew Rate
323  Drive Strength Field: R0/6
324  Speed Field: medium(100MHz)
325  Open Drain Enable Field: Open Drain Disabled
326  Pull / Keep Enable Field: Pull/Keeper Enabled
327  Pull / Keep Select Field: Keeper
328  Pull Up / Down Config. Field: 100K Ohm Pull Down
329  Hyst. Enable Field: Hysteresis Disabled */
330 }
331 
332 
333 /*
334  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
335 LPUART1_DeinitPins:
336 - options: {coreID: core0, enableClock: 'true'}
337 - pin_list:
338  - {pin_num: K14, peripheral: GPIO1, signal: 'gpio_io, 12', pin_signal: GPIO_AD_B0_12}
339  - {pin_num: L14, peripheral: GPIO1, signal: 'gpio_io, 13', pin_signal: GPIO_AD_B0_13}
340  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
341  */
342 
343 /*FUNCTION**********************************************************************
344  *
345  * Function Name : LPUART1_DeinitPins
346  * Description : Configures pin routing and optionally pin electrical features.
347  *
348  *END**************************************************************************/
349 void LPUART1_DeinitPins(void) {
350  CLOCK_EnableClock(kCLOCK_Iomuxc); /* iomuxc clock (iomuxc_clk_enable): 0x03u */
351 
352  IOMUXC_SetPinMux(
353  IOMUXC_GPIO_AD_B0_12_GPIO1_IO12, /* GPIO_AD_B0_12 is configured as GPIO1_IO12 */
354  0U); /* Software Input On Field: Input Path is determined by functionality */
355  IOMUXC_SetPinMux(
356  IOMUXC_GPIO_AD_B0_13_GPIO1_IO13, /* GPIO_AD_B0_13 is configured as GPIO1_IO13 */
357  0U); /* Software Input On Field: Input Path is determined by functionality */
358 }
359 
360 /*******************************************************************************
361  * EOF
362  ******************************************************************************/
void LPUART1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:387
void LPI2C1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:311
void LPSPI1_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:440
void LPUART1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:421
void LPSPI1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:469
void LPI2C1_DeinitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:351
void BOARD_InitPins(void)
Configures pin routing and optionally pin electrical features.
Definition: pin_mux.c:47