1 /*
2  * Copyright 2024 NXP
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
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 /* clang-format off */
13 /*
14  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
15 !!GlobalInfo
16 product: Pins v15.0
17 processor: MIMXRT798S
18 package_id: MIMXRT798SGFOA
19 mcu_data: ksdk2_0
20 processor_version: 0.0.0
21  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
22  */
23 /* clang-format on */
24 
25 #include "fsl_common.h"
26 #include "fsl_iopctl.h"
27 #include "pin_mux.h"
28 
29 /* FUNCTION ************************************************************************************************************
30  *
31  * Function Name : BOARD_InitBootPins
32  * Description   : Calls initialization functions.
33  *
34  * END ****************************************************************************************************************/
BOARD_InitBootPins(void)35 void BOARD_InitBootPins(void)
36 {
37     BOARD_InitPins();
38 }
39 
40 /* clang-format off */
41 /*
42  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
43 BOARD_InitPins:
44 - options: {callFromInitBoot: 'true', coreID: cm33_core0, enableClock: 'true'}
45 - pin_list:
46   - {pin_num: N4, peripheral: LP_FLEXCOMM0, signal: P0, pin_signal: PIO0_31/LP_FLEXCOMM0_P0/UTICK0_CAP2/SCT0_OUT8/CTIMER4_MAT0, input_buffer: enable}
47   - {pin_num: N5, peripheral: LP_FLEXCOMM0, signal: P1, pin_signal: PIO1_0/LP_FLEXCOMM0_P1/SCT0_OUT9/CTIMER4_MAT1}
48  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
49  */
50 /* clang-format on */
51 
52 /* FUNCTION ************************************************************************************************************
53  *
54  * Function Name : BOARD_InitPins
55  * Description   : Configures pin routing and optionally pin electrical features.
56  *
57  * END ****************************************************************************************************************/
58 /* Function assigned for the Cortex-M33 (Core #0) */
BOARD_InitPins(void)59 void BOARD_InitPins(void)
60 {
61     /* Reset IOPCTL0 module */
62     RESET_ClearPeripheralReset(kIOPCTL0_RST_SHIFT_RSTn);
63 
64     const uint32_t port0_pin31_config = (/* Pin is configured as LP_FLEXCOMM0_P0 */
65                                          IOPCTL_PIO_FUNC1 |
66                                          /* Disable pull-up / pull-down function */
67                                          IOPCTL_PIO_PUPD_DI |
68                                          /* Enable pull-down function */
69                                          IOPCTL_PIO_PULLDOWN_EN |
70                                          /* Enables input buffer function */
71                                          IOPCTL_PIO_INBUF_EN |
72                                          /* Pseudo Output Drain is disabled */
73                                          IOPCTL_PIO_PSEDRAIN_DI |
74                                          /* Input function is not inverted */
75                                          IOPCTL_PIO_INV_DI |
76                                          /* Selects transmitter current drive 100ohm */
77                                          IOPCTL_PIO_DRIVE_100OHM);
78     /* PORT0 PIN31 (coords: N4) is configured as LP_FLEXCOMM0_P0 */
79     IOPCTL_PinMuxSet(0U, 31U, port0_pin31_config);
80 
81     const uint32_t port1_pin0_config = (/* Pin is configured as LP_FLEXCOMM0_P1 */
82                                         IOPCTL_PIO_FUNC1 |
83                                         /* Disable pull-up / pull-down function */
84                                         IOPCTL_PIO_PUPD_DI |
85                                         /* Enable pull-down function */
86                                         IOPCTL_PIO_PULLDOWN_EN |
87                                         /* Disable input buffer function */
88                                         IOPCTL_PIO_INBUF_DI |
89                                         /* Pseudo Output Drain is disabled */
90                                         IOPCTL_PIO_PSEDRAIN_DI |
91                                         /* Input function is not inverted */
92                                         IOPCTL_PIO_INV_DI |
93                                         /* Selects transmitter current drive 100ohm */
94                                         IOPCTL_PIO_DRIVE_100OHM);
95     /* PORT1 PIN0 (coords: N5) is configured as LP_FLEXCOMM0_P1 */
96     IOPCTL_PinMuxSet(1U, 0U, port1_pin0_config);
97 }
98 /***********************************************************************************************************************
99  * EOF
100  **********************************************************************************************************************/
101