diff options
Diffstat (limited to 'lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A31A/project_template/pin_mux.c')
-rw-r--r-- | lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A31A/project_template/pin_mux.c | 901 |
1 files changed, 901 insertions, 0 deletions
diff --git a/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A31A/project_template/pin_mux.c b/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A31A/project_template/pin_mux.c new file mode 100644 index 000000000..0e179a854 --- /dev/null +++ b/lib/chibios-contrib/ext/mcux-sdk/devices/K32L2A31A/project_template/pin_mux.c | |||
@@ -0,0 +1,901 @@ | |||
1 | /* | ||
2 | * Copyright 2019 NXP | ||
3 | * All rights reserved. | ||
4 | * | ||
5 | * SPDX-License-Identifier: BSD-3-Clause | ||
6 | */ | ||
7 | |||
8 | /*********************************************************************************************************************** | ||
9 | * This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file | ||
10 | * will be overwritten if the respective MCUXpresso Config Tools is used to update this file. | ||
11 | **********************************************************************************************************************/ | ||
12 | |||
13 | /* clang-format off */ | ||
14 | /* | ||
15 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
16 | !!GlobalInfo | ||
17 | product: Pins v6.0 | ||
18 | processor: K32L2A31xxxxA | ||
19 | package_id: K32L2A31VLL1A | ||
20 | mcu_data: ksdk2_0 | ||
21 | processor_version: 0.0.0 | ||
22 | pin_labels: | ||
23 | - {pin_num: '1', pin_signal: ADC0_SE16/PTE0/RTC_CLKOUT/LPSPI1_SIN/LPUART1_TX/CMP0_OUT/LPI2C1_SDA, label: 'U2[3]/INT1_21002', identifier: GYRO_INT1} | ||
24 | - {pin_num: '2', pin_signal: ADC0_SE17/PTE1/LLWU_P0/LPSPI1_SOUT/LPUART1_RX/LPI2C1_SCL, label: 'U2[2]/INT2_21002', identifier: GYRO_INT2} | ||
25 | - {pin_num: '3', pin_signal: ADC0_SE18/PTE2/LLWU_P1/LPSPI1_SCK/LPUART1_CTS_b/LPI2C1_SDAS, label: 'J2[5]'} | ||
26 | - {pin_num: '4', pin_signal: ADC0_SE19/PTE3/LPSPI1_SIN/LPUART1_RTS_b/LPI2C1_SCLS, label: 'J2[7]'} | ||
27 | - {pin_num: '5', pin_signal: PTE4/LLWU_P2/LPSPI1_PCS0, label: BUTTON1, identifier: SW3} | ||
28 | - {pin_num: '6', pin_signal: PTE5/LPSPI1_PCS1, label: 'U10[9]/INT2_8700', identifier: ACCEL_INT2} | ||
29 | - {pin_num: '7', pin_signal: PTE6/LLWU_P16/LPSPI1_PCS2/USB_SOF_OUT, label: 'J2[9]'} | ||
30 | - {pin_num: '8', pin_signal: VDD8, label: 'J17[2]/P3V3_K32L2A'} | ||
31 | - {pin_num: '30', pin_signal: VDD31, label: 'J17[2]/P3V3_K32L2A'} | ||
32 | - {pin_num: '22', pin_signal: VDDA, label: 'J17[2]/P3V3_K32L2A'} | ||
33 | - {pin_num: '48', pin_signal: VDD53, label: 'J17[2]/P3V3_K32L2A'} | ||
34 | - {pin_num: '75', pin_signal: VDD82, label: 'J17[2]/P3V3_K32L2A'} | ||
35 | - {pin_num: '89', pin_signal: VDD98, label: 'J17[2]/P3V3_K32L2A'} | ||
36 | - {pin_num: '9', pin_signal: VSS9, label: GND} | ||
37 | - {pin_num: '25', pin_signal: VSSA, label: GND} | ||
38 | - {pin_num: '29', pin_signal: VSS30, label: GND} | ||
39 | - {pin_num: '49', pin_signal: VSS54, label: GND} | ||
40 | - {pin_num: '74', pin_signal: VSS81, label: GND} | ||
41 | - {pin_num: '88', pin_signal: VSS97, label: GND} | ||
42 | - {pin_num: '11', pin_signal: USB0_DM, label: 'J10[2]/K32L2A_USB_DN', identifier: USB_DN} | ||
43 | - {pin_num: '10', pin_signal: USB0_DP, label: 'J10[3]/K32L2A_USB_DP', identifier: USB_DP} | ||
44 | - {pin_num: '12', pin_signal: VOUT33, label: TP11/VOUT33} | ||
45 | - {pin_num: '13', pin_signal: VREGIN, label: P5V_K32L2A, identifier: VREGIN} | ||
46 | - {pin_num: '14', pin_signal: ADC0_DP1/ADC0_SE1/PTE16/LPSPI0_PCS0/LPUART2_TX/TPM0_CLKIN/LPSPI1_PCS3/FXIO0_D0, label: 'J2[11]/FXIO_D0'} | ||
47 | - {pin_num: '15', pin_signal: ADC0_DM1/ADC0_SE5a/PTE17/LLWU_P19/LPSPI0_SCK/LPUART2_RX/TPM1_CLKIN/LPTMR0_ALT3/LPTMR1_ALT3/FXIO0_D1, label: 'J2[13]/FXIO_D1'} | ||
48 | - {pin_num: '16', pin_signal: ADC0_DP2/ADC0_SE2/PTE18/LLWU_P20/LPSPI0_SOUT/LPUART2_CTS_b/LPI2C0_SDA/FXIO0_D2, label: 'J2[15]/FXIO_D2'} | ||
49 | - {pin_num: '17', pin_signal: ADC0_DM2/ADC0_SE6a/PTE19/LPSPI0_SIN/LPUART2_RTS_b/LPI2C0_SCL/FXIO0_D3, label: 'J2[17]/FXIO_D3'} | ||
50 | - {pin_num: '18', pin_signal: ADC0_DP0/ADC0_SE0/PTE20/LPSPI2_SCK/TPM1_CH0/LPUART0_TX/FXIO0_D4, label: 'J4[1]/DIFF_ADC0_DP0/FXIO_D4'} | ||
51 | - {pin_num: '19', pin_signal: ADC0_DM0/ADC0_SE4a/PTE21/LPSPI2_SOUT/TPM1_CH1/LPUART0_RX/FXIO0_D5, label: 'J4[3]/DIFF_ADC0_DM0/FXIO_D5'} | ||
52 | - {pin_num: '20', pin_signal: ADC0_DP3/ADC0_SE3/PTE22/LPSPI2_SIN/TPM2_CH0/LPUART2_TX/FXIO0_D6, label: 'J4[5]/DIFF_ADC0_DP3/FXIO_D6'} | ||
53 | - {pin_num: '21', pin_signal: ADC0_DM3/ADC0_SE7a/PTE23/LPSPI2_PCS0/TPM2_CH1/LPUART2_RX/FXIO0_D7, label: 'J4[7]/DIFF_ADC0_DM3/FXIO_D7'} | ||
54 | - {pin_num: '23', pin_signal: VREFH/VREF_OUT, label: 'J17[2]/P3V3_K32L2A'} | ||
55 | - {pin_num: '24', pin_signal: VREFL, label: GND} | ||
56 | - {pin_num: '26', pin_signal: CMP1_IN5/CMP0_IN5/ADC0_SE4b/PTE29/EMVSIM0_CLK/TPM0_CH2/TPM0_CLKIN, label: LEDRGB_RED, identifier: LED_RED} | ||
57 | - {pin_num: '27', pin_signal: DAC0_OUT/CMP1_IN3/ADC0_SE23/CMP0_IN4/PTE30/EMVSIM0_RST/TPM0_CH3/TPM1_CLKIN, label: 'J4[11]/DAC0_OUT'} | ||
58 | - {pin_num: '28', pin_signal: PTE31/EMVSIM0_VCCEN/TPM0_CH4/TPM2_CLKIN/LPI2C0_HREQ, label: LEDRGB_BLUE, identifier: LED_BLUE} | ||
59 | - {pin_num: '31', pin_signal: ADC0_SE20/PTE24/EMVSIM0_IO/TPM0_CH0/LPI2C0_SCL, label: 'U2[11]/U10[4]/ACCEL_I2C0_SCL', identifier: ACCEL_SCL;GYRO_SCL} | ||
60 | - {pin_num: '32', pin_signal: ADC0_SE21/PTE25/LLWU_P21/EMVSIM0_PD/TPM0_CH1/LPI2C0_SDA, label: 'U2[12]/U10[6]/ACCEL_I2C0_SDA', identifier: ACCEL_SDA;GYRO_SDA} | ||
61 | - {pin_num: '33', pin_signal: PTE26/RTC_CLKOUT/TPM0_CH5/LPI2C0_SCLS/USB_CLKIN, label: 'U10[16]/U11[2]/ACCEL_RST', identifier: ACCEL_RST;GYRO_RST} | ||
62 | - {pin_num: '34', pin_signal: TSI0_CH1/PTA0/LPUART0_CTS_b/TPM0_CH5/LPI2C0_SDAS/SWD_CLK, label: 'J11[4]/U5[11]/K32L2A_SWD_CLK/SWD_CLK_TGTMCU'} | ||
63 | - {pin_num: '35', pin_signal: TSI0_CH2/PTA1/LPUART0_RX/TPM2_CH0, label: TSI_ELECTRODE1/TSI0_CH2, identifier: TSI_ELECTRODE_1} | ||
64 | - {pin_num: '36', pin_signal: TSI0_CH3/PTA2/LPUART0_TX/TPM2_CH1, label: TSI_ELECTRODE2/TSI0_CH3, identifier: TSI_ELECTRODE_2} | ||
65 | - {pin_num: '37', pin_signal: TSI0_CH4/PTA3/LPI2C1_SCL/TPM0_CH0/LPUART0_RTS_b/SWD_DIO, label: 'J11[2]/U5[3]/SWD_DIO_TGTMCU'} | ||
66 | - {pin_num: '38', pin_signal: TSI0_CH5/PTA4/LLWU_P3/LPI2C1_SDA/TPM0_CH1/NMI0_b, label: BUTTON2, identifier: SW2} | ||
67 | - {pin_num: '39', pin_signal: PTA5/USB_CLKIN/TPM0_CH2/LPI2C2_HREQ, label: 'J3[1]'} | ||
68 | - {pin_num: '40', pin_signal: PTA6/TPM0_CH3, label: 'J3[3]'} | ||
69 | - {pin_num: '41', pin_signal: PTA7/LPSPI0_PCS3/TPM0_CH4/LPI2C2_SDAS, label: 'J3[5]'} | ||
70 | - {pin_num: '42', pin_signal: PTA12/TPM1_CH0/LPI2C2_SCL, label: 'J2[20]/D15/I2C2_SCL'} | ||
71 | - {pin_num: '43', pin_signal: PTA13/LLWU_P4/TPM1_CH1/LPI2C2_SDA, label: 'J2[18]/D14/I2C2_SDA'} | ||
72 | - {pin_num: '44', pin_signal: PTA14/LPSPI0_PCS0/LPUART0_TX/LPI2C2_SCL, label: 'J3[7]'} | ||
73 | - {pin_num: '45', pin_signal: PTA15/LPSPI0_SCK/LPUART0_RX, label: 'J3[9]'} | ||
74 | - {pin_num: '46', pin_signal: PTA16/LPSPI0_SOUT/LPUART0_CTS_b, label: 'J3[11]'} | ||
75 | - {pin_num: '47', pin_signal: ADC0_SE22/PTA17/LPSPI0_SIN/LPUART0_RTS_b, label: 'J3[13]'} | ||
76 | - {pin_num: '50', pin_signal: EXTAL0/PTA18/LPUART1_RX/TPM0_CLKIN, label: 'Y1[1]/EXTAL_32KHZ', identifier: EXTAL0} | ||
77 | - {pin_num: '51', pin_signal: XTAL0/PTA19/LPUART1_TX/TPM1_CLKIN/LPTMR0_ALT1/LPTMR1_ALT1, label: 'Y1[2]/XTAL_32KHZ', identifier: XTAL0} | ||
78 | - {pin_num: '52', pin_signal: PTA20/LPI2C0_SCLS/TPM2_CLKIN/RESET_b, label: 'J3[6]/J11[10]/U7[21]/RST_K20D50_B'} | ||
79 | - {pin_num: '53', pin_signal: ADC0_SE8/TSI0_CH0/PTB0/LLWU_P5/LPI2C0_SCL/TPM1_CH0/FXIO0_D8, label: 'J4[2]/A0/ADC0_SE8/FXIO_D8'} | ||
80 | - {pin_num: '54', pin_signal: ADC0_SE9/TSI0_CH6/PTB1/LPI2C0_SDA/TPM1_CH1/FXIO0_D9, label: 'J4[4]/A1/ADC0_SE9/FXIO_D9'} | ||
81 | - {pin_num: '55', pin_signal: ADC0_SE12/TSI0_CH7/PTB2/LPI2C0_SCL/TPM2_CH0/LPUART0_RTS_b/FXIO0_D10, label: 'J1[6]/D2/FXIO_D10'} | ||
82 | - {pin_num: '56', pin_signal: ADC0_SE13/TSI0_CH8/PTB3/LPI2C0_SDA/TPM2_CH1/LPSPI1_PCS3/LPUART0_CTS_b/FXIO0_D11, label: 'J4[8]/A3/ADC0_SE13/FXIO_D11'} | ||
83 | - {pin_num: '57', pin_signal: PTB7/LPSPI1_PCS1, label: 'U7[31]/OpenSDA GPIO'} | ||
84 | - {pin_num: '58', pin_signal: PTB8/LPSPI1_PCS0/FXIO0_D12, label: 'J3[15]/FXIO_D12'} | ||
85 | - {pin_num: '59', pin_signal: PTB9/LPSPI1_SCK/FXIO0_D13, label: 'J1[8]/D3/FXIO_D13'} | ||
86 | - {pin_num: '60', pin_signal: PTB10/LPSPI1_PCS0/FXIO0_D14, label: 'J1[10]/D4/FXIO_D14'} | ||
87 | - {pin_num: '61', pin_signal: PTB11/LPSPI1_SCK/TPM2_CLKIN/FXIO0_D15, label: 'J1[12]/D5/FXIO_D15'} | ||
88 | - {pin_num: '62', pin_signal: TSI0_CH9/PTB16/LPSPI1_SOUT/LPUART0_RX/TPM0_CLKIN/LPSPI2_PCS3/FXIO0_D16, label: 'J1[2]/U7[25]/D0/UART0_RX/FXIO_D16/UART1_RX_TGTMCU', | ||
89 | identifier: DEBUG_UART_RX} | ||
90 | - {pin_num: '63', pin_signal: TSI0_CH10/PTB17/LPSPI1_SIN/LPUART0_TX/TPM1_CLKIN/LPSPI2_PCS2/FXIO0_D17, label: 'J1[4]/U7[24]/D1/UART0_TX/FXIO_D17/UART1_TX_TGTMCU', | ||
91 | identifier: DEBUG_UART_TX} | ||
92 | - {pin_num: '64', pin_signal: TSI0_CH11/PTB18/TPM2_CH0/LPI2C1_HREQ/FXIO0_D18, label: 'J1[1]/FXIO_D18'} | ||
93 | - {pin_num: '65', pin_signal: TSI0_CH12/PTB19/TPM2_CH1/LPSPI2_PCS1/FXIO0_D19, label: 'J1[3]/FXIO_D19'} | ||
94 | - {pin_num: '66', pin_signal: PTB20/LPSPI2_PCS0/CMP0_OUT, label: 'J20[4]/SPI2_PCS0'} | ||
95 | - {pin_num: '67', pin_signal: PTB21/LPSPI2_SCK/CMP1_OUT, label: 'J20[5]/SPI2_SCK'} | ||
96 | - {pin_num: '68', pin_signal: PTB22/LPSPI2_SOUT, label: 'J20[6]/SPI2_SOUT'} | ||
97 | - {pin_num: '69', pin_signal: PTB23/LPSPI2_SIN, label: 'J20[7]/SPI2_SIN'} | ||
98 | - {pin_num: '70', pin_signal: ADC0_SE14/TSI0_CH13/PTC0/LPSPI2_PCS1/USB_SOF_OUT/CMP0_OUT, label: 'J1[5]'} | ||
99 | - {pin_num: '71', pin_signal: ADC0_SE15/TSI0_CH14/PTC1/LLWU_P6/LPI2C1_SCL/LPUART1_RTS_b/TPM0_CH0, label: 'J4[12]/A5/ADC0_SE15/I2C1_SCL'} | ||
100 | - {pin_num: '72', pin_signal: ADC0_SE11/CMP1_IN0/TSI0_CH15/PTC2/LPI2C1_SDA/LPUART1_CTS_b/TPM0_CH1, label: 'J4[10]/A4/ADC0_SE11/I2C1_SDA'} | ||
101 | - {pin_num: '73', pin_signal: CMP1_IN1/PTC3/LLWU_P7/LPSPI0_PCS1/LPUART1_RX/TPM0_CH2/CLKOUT, label: 'J4[6]/A2/CMP1_IN1/SPI0_PCS1'} | ||
102 | - {pin_num: '76', pin_signal: PTC4/LLWU_P8/LPSPI0_PCS0/LPUART1_TX/TPM0_CH3/CMP1_OUT, label: LEDRGB_GREEN, identifier: LED_GREEN} | ||
103 | - {pin_num: '77', pin_signal: PTC5/LLWU_P9/LPSPI0_SCK/LPTMR0_ALT2/LPTMR1_ALT2/CMP0_OUT, label: 'J4[9]/CMP0_OUT'} | ||
104 | - {pin_num: '78', pin_signal: CMP0_IN0/PTC6/LLWU_P10/LPSPI0_SOUT, label: 'J20[3]'} | ||
105 | - {pin_num: '79', pin_signal: CMP0_IN1/PTC7/LPSPI0_SIN/USB_SOF_OUT/FXIO0_D20, label: 'J1[11]/SOF_OUT/FXIO_D20', identifier: SOF_OUT} | ||
106 | - {pin_num: '80', pin_signal: CMP0_IN2/PTC8/LPI2C0_SCL/TPM0_CH4/FXIO0_D21, label: 'J1[7]/FXIO_D21'} | ||
107 | - {pin_num: '81', pin_signal: CMP0_IN3/PTC9/LPI2C0_SDA/TPM0_CH5/FXIO0_D22, label: 'J1[9]/FXIO_D22'} | ||
108 | - {pin_num: '82', pin_signal: PTC10/LPI2C1_SCL/FXIO0_D23, label: 'J1[13]/FXIO_D23'} | ||
109 | - {pin_num: '83', pin_signal: PTC11/LLWU_P11/LPI2C1_SDA, label: 'J1[15]'} | ||
110 | - {pin_num: '84', pin_signal: PTC12/LPI2C1_SCLS/TPM0_CLKIN, label: 'J1[14]/D6'} | ||
111 | - {pin_num: '85', pin_signal: PTC13/LPI2C1_SDAS/TPM1_CLKIN, label: 'J1[16]/D7'} | ||
112 | - {pin_num: '86', pin_signal: PTC14/EMVSIM0_CLK, label: 'JP1[3]/EMVSIM_CLK'} | ||
113 | - {pin_num: '87', pin_signal: PTC15/EMVSIM0_RST, label: 'JP1[4]/EMVSIM_RST'} | ||
114 | - {pin_num: '90', pin_signal: PTC16/EMVSIM0_VCCEN, label: 'JP1[5]/EMVSIM_VCCEN'} | ||
115 | - {pin_num: '91', pin_signal: PTC17/EMVSIM0_IO/LPSPI0_PCS3, label: 'JP1[6]/EMVSIM_IO'} | ||
116 | - {pin_num: '92', pin_signal: PTC18/EMVSIM0_PD/LPSPI0_PCS2, label: 'JP1[7]/EMVSIM_PD'} | ||
117 | - {pin_num: '93', pin_signal: PTD0/LLWU_P12/LPSPI0_PCS0/LPUART2_RTS_b/TPM0_CH0/FXIO0_D0, label: 'J2[6]/D10/SPI0_PCS0'} | ||
118 | - {pin_num: '94', pin_signal: ADC0_SE5b/PTD1/LPSPI0_SCK/LPUART2_CTS_b/TPM0_CH1/FXIO0_D1, label: 'J2[12]/D13/SPI0_SCK'} | ||
119 | - {pin_num: '95', pin_signal: PTD2/LLWU_P13/LPSPI0_SOUT/LPUART2_RX/TPM0_CH2/FXIO0_D2, label: 'J2[8]/D11/SPI0_SOUT'} | ||
120 | - {pin_num: '96', pin_signal: PTD3/LPSPI0_SIN/LPUART2_TX/TPM0_CH3/FXIO0_D3, label: 'J2[10]/D12/SPI0_SIN'} | ||
121 | - {pin_num: '97', pin_signal: PTD4/LLWU_P14/LPSPI1_PCS0/LPUART2_RX/TPM0_CH4/LPUART0_RTS_b/FXIO0_D4, label: 'U10[11]/INT1_8700', identifier: ACCEL_INT1} | ||
122 | - {pin_num: '98', pin_signal: ADC0_SE6b/PTD5/LPSPI1_SCK/LPUART2_TX/TPM0_CH5/LPUART0_CTS_b/FXIO0_D5, label: 'Q1[1]/LIGHT_SENSOR', identifier: LIGHT_SENSOR} | ||
123 | - {pin_num: '99', pin_signal: ADC0_SE7b/PTD6/LLWU_P15/LPSPI1_SOUT/LPUART0_RX/FXIO0_D6, label: 'J2[2]/D8'} | ||
124 | - {pin_num: '100', pin_signal: PTD7/LPSPI1_SIN/LPUART0_TX/FXIO0_D7, label: 'J2[4]/D9'} | ||
125 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
126 | */ | ||
127 | /* clang-format on */ | ||
128 | |||
129 | #include "fsl_common.h" | ||
130 | #include "fsl_port.h" | ||
131 | #include "fsl_gpio.h" | ||
132 | #include "pin_mux.h" | ||
133 | |||
134 | /* FUNCTION ************************************************************************************************************ | ||
135 | * | ||
136 | * Function Name : BOARD_InitBootPins | ||
137 | * Description : Calls initialization functions. | ||
138 | * | ||
139 | * END ****************************************************************************************************************/ | ||
140 | void BOARD_InitBootPins(void) | ||
141 | { | ||
142 | BOARD_InitPins(); | ||
143 | BOARD_InitDEBUG_UARTPins(); | ||
144 | } | ||
145 | |||
146 | /* clang-format off */ | ||
147 | /* | ||
148 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
149 | BOARD_InitPins: | ||
150 | - options: {callFromInitBoot: 'true', prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
151 | - pin_list: [] | ||
152 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
153 | */ | ||
154 | /* clang-format on */ | ||
155 | |||
156 | /* FUNCTION ************************************************************************************************************ | ||
157 | * | ||
158 | * Function Name : BOARD_InitPins | ||
159 | * Description : Configures pin routing and optionally pin electrical features. | ||
160 | * | ||
161 | * END ****************************************************************************************************************/ | ||
162 | void BOARD_InitPins(void) | ||
163 | { | ||
164 | } | ||
165 | |||
166 | /* clang-format off */ | ||
167 | /* | ||
168 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
169 | BOARD_InitBUTTONsPins: | ||
170 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
171 | - pin_list: | ||
172 | - {pin_num: '5', peripheral: GPIOE, signal: 'GPIO, 4', pin_signal: PTE4/LLWU_P2/LPSPI1_PCS0, direction: INPUT, slew_rate: slow, open_drain: disable, pull_select: up, | ||
173 | pull_enable: enable} | ||
174 | - {pin_num: '38', peripheral: GPIOA, signal: 'GPIO, 4', pin_signal: TSI0_CH5/PTA4/LLWU_P3/LPI2C1_SDA/TPM0_CH1/NMI0_b, direction: INPUT, slew_rate: slow, open_drain: disable, | ||
175 | pull_select: down, pull_enable: disable} | ||
176 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
177 | */ | ||
178 | /* clang-format on */ | ||
179 | |||
180 | /* FUNCTION ************************************************************************************************************ | ||
181 | * | ||
182 | * Function Name : BOARD_InitBUTTONsPins | ||
183 | * Description : Configures pin routing and optionally pin electrical features. | ||
184 | * | ||
185 | * END ****************************************************************************************************************/ | ||
186 | void BOARD_InitBUTTONsPins(void) | ||
187 | { | ||
188 | /* Clock Gate Control: Clock enabled */ | ||
189 | CLOCK_EnableClock(kCLOCK_PortA); | ||
190 | /* Clock Gate Control: Clock enabled */ | ||
191 | CLOCK_EnableClock(kCLOCK_PortE); | ||
192 | |||
193 | gpio_pin_config_t SW2_config = { | ||
194 | .pinDirection = kGPIO_DigitalInput, | ||
195 | .outputLogic = 0U | ||
196 | }; | ||
197 | /* Initialize GPIO functionality on pin PTA4 (pin 38) */ | ||
198 | GPIO_PinInit(BOARD_SW2_GPIO, BOARD_SW2_PIN, &SW2_config); | ||
199 | |||
200 | gpio_pin_config_t SW3_config = { | ||
201 | .pinDirection = kGPIO_DigitalInput, | ||
202 | .outputLogic = 0U | ||
203 | }; | ||
204 | /* Initialize GPIO functionality on pin PTE4 (pin 5) */ | ||
205 | GPIO_PinInit(BOARD_SW3_GPIO, BOARD_SW3_PIN, &SW3_config); | ||
206 | |||
207 | /* PORTA4 (pin 38) is configured as PTA4 */ | ||
208 | PORT_SetPinMux(BOARD_SW2_PORT, BOARD_SW2_PIN, kPORT_MuxAsGpio); | ||
209 | |||
210 | PORTA->PCR[4] = | ||
211 | ((PORTA->PCR[4] & | ||
212 | /* Mask bits to zero which are setting */ | ||
213 | (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_ISF_MASK))) | ||
214 | |||
215 | /* Pull Select: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE | ||
216 | * field is set. */ | ||
217 | | PORT_PCR_PS(kPORT_PullDown) | ||
218 | |||
219 | /* Pull Enable: Internal pullup or pulldown resistor is not enabled on the corresponding pin. */ | ||
220 | | PORT_PCR_PE(kPORT_PullDisable) | ||
221 | |||
222 | /* Slew Rate Enable: Slow slew rate is configured on the corresponding pin, if the pin is configured as | ||
223 | * a digital output. */ | ||
224 | | PORT_PCR_SRE(kPORT_SlowSlewRate) | ||
225 | |||
226 | /* Open Drain Enable: Open drain output is disabled on the corresponding pin. */ | ||
227 | | PORT_PCR_ODE(kPORT_OpenDrainDisable)); | ||
228 | |||
229 | const port_pin_config_t SW3 = {/* Internal pull-up resistor is enabled */ | ||
230 | kPORT_PullUp, | ||
231 | /* Slow slew rate is configured */ | ||
232 | kPORT_SlowSlewRate, | ||
233 | /* Passive filter is disabled */ | ||
234 | kPORT_PassiveFilterDisable, | ||
235 | /* Open drain is disabled */ | ||
236 | kPORT_OpenDrainDisable, | ||
237 | /* Low drive strength is configured */ | ||
238 | kPORT_LowDriveStrength, | ||
239 | /* Pin is configured as PTE4 */ | ||
240 | kPORT_MuxAsGpio, | ||
241 | /* Pin Control Register fields [15:0] are not locked */ | ||
242 | kPORT_UnlockRegister}; | ||
243 | /* PORTE4 (pin 5) is configured as PTE4 */ | ||
244 | PORT_SetPinConfig(BOARD_SW3_PORT, BOARD_SW3_PIN, &SW3); | ||
245 | } | ||
246 | |||
247 | /* clang-format off */ | ||
248 | /* | ||
249 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
250 | BOARD_InitLEDsPins: | ||
251 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
252 | - pin_list: | ||
253 | - {pin_num: '26', peripheral: GPIOE, signal: 'GPIO, 29', pin_signal: CMP1_IN5/CMP0_IN5/ADC0_SE4b/PTE29/EMVSIM0_CLK/TPM0_CH2/TPM0_CLKIN, direction: OUTPUT, gpio_init_state: 'true', | ||
254 | slew_rate: slow, open_drain: disable, pull_select: down, pull_enable: disable} | ||
255 | - {pin_num: '28', peripheral: GPIOE, signal: 'GPIO, 31', pin_signal: PTE31/EMVSIM0_VCCEN/TPM0_CH4/TPM2_CLKIN/LPI2C0_HREQ, direction: OUTPUT, gpio_init_state: 'true', | ||
256 | slew_rate: slow, open_drain: disable, pull_select: down, pull_enable: disable} | ||
257 | - {pin_num: '76', peripheral: GPIOC, signal: 'GPIO, 4', pin_signal: PTC4/LLWU_P8/LPSPI0_PCS0/LPUART1_TX/TPM0_CH3/CMP1_OUT, direction: OUTPUT, gpio_init_state: 'true', | ||
258 | slew_rate: slow, open_drain: disable, pull_select: down, pull_enable: disable} | ||
259 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
260 | */ | ||
261 | /* clang-format on */ | ||
262 | |||
263 | /* FUNCTION ************************************************************************************************************ | ||
264 | * | ||
265 | * Function Name : BOARD_InitLEDsPins | ||
266 | * Description : Configures pin routing and optionally pin electrical features. | ||
267 | * | ||
268 | * END ****************************************************************************************************************/ | ||
269 | void BOARD_InitLEDsPins(void) | ||
270 | { | ||
271 | /* Clock Gate Control: Clock enabled */ | ||
272 | CLOCK_EnableClock(kCLOCK_PortC); | ||
273 | /* Clock Gate Control: Clock enabled */ | ||
274 | CLOCK_EnableClock(kCLOCK_PortE); | ||
275 | |||
276 | gpio_pin_config_t LED_GREEN_config = { | ||
277 | .pinDirection = kGPIO_DigitalOutput, | ||
278 | .outputLogic = 1U | ||
279 | }; | ||
280 | /* Initialize GPIO functionality on pin PTC4 (pin 76) */ | ||
281 | GPIO_PinInit(BOARD_LED_GREEN_GPIO, BOARD_LED_GREEN_PIN, &LED_GREEN_config); | ||
282 | |||
283 | gpio_pin_config_t LED_RED_config = { | ||
284 | .pinDirection = kGPIO_DigitalOutput, | ||
285 | .outputLogic = 1U | ||
286 | }; | ||
287 | /* Initialize GPIO functionality on pin PTE29 (pin 26) */ | ||
288 | GPIO_PinInit(BOARD_LED_RED_GPIO, BOARD_LED_RED_PIN, &LED_RED_config); | ||
289 | |||
290 | gpio_pin_config_t LED_BLUE_config = { | ||
291 | .pinDirection = kGPIO_DigitalOutput, | ||
292 | .outputLogic = 1U | ||
293 | }; | ||
294 | /* Initialize GPIO functionality on pin PTE31 (pin 28) */ | ||
295 | GPIO_PinInit(BOARD_LED_BLUE_GPIO, BOARD_LED_BLUE_PIN, &LED_BLUE_config); | ||
296 | |||
297 | /* PORTC4 (pin 76) is configured as PTC4 */ | ||
298 | PORT_SetPinMux(BOARD_LED_GREEN_PORT, BOARD_LED_GREEN_PIN, kPORT_MuxAsGpio); | ||
299 | |||
300 | PORTC->PCR[4] = | ||
301 | ((PORTC->PCR[4] & | ||
302 | /* Mask bits to zero which are setting */ | ||
303 | (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_ISF_MASK))) | ||
304 | |||
305 | /* Pull Select: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE | ||
306 | * field is set. */ | ||
307 | | PORT_PCR_PS(kPORT_PullDown) | ||
308 | |||
309 | /* Pull Enable: Internal pullup or pulldown resistor is not enabled on the corresponding pin. */ | ||
310 | | PORT_PCR_PE(kPORT_PullDisable) | ||
311 | |||
312 | /* Slew Rate Enable: Slow slew rate is configured on the corresponding pin, if the pin is configured as | ||
313 | * a digital output. */ | ||
314 | | PORT_PCR_SRE(kPORT_SlowSlewRate) | ||
315 | |||
316 | /* Open Drain Enable: Open drain output is disabled on the corresponding pin. */ | ||
317 | | PORT_PCR_ODE(kPORT_OpenDrainDisable)); | ||
318 | |||
319 | const port_pin_config_t LED_RED = {/* Internal pull-up/down resistor is disabled */ | ||
320 | kPORT_PullDisable, | ||
321 | /* Slow slew rate is configured */ | ||
322 | kPORT_SlowSlewRate, | ||
323 | /* Passive filter is disabled */ | ||
324 | kPORT_PassiveFilterDisable, | ||
325 | /* Open drain is disabled */ | ||
326 | kPORT_OpenDrainDisable, | ||
327 | /* Low drive strength is configured */ | ||
328 | kPORT_LowDriveStrength, | ||
329 | /* Pin is configured as PTE29 */ | ||
330 | kPORT_MuxAsGpio, | ||
331 | /* Pin Control Register fields [15:0] are not locked */ | ||
332 | kPORT_UnlockRegister}; | ||
333 | /* PORTE29 (pin 26) is configured as PTE29 */ | ||
334 | PORT_SetPinConfig(BOARD_LED_RED_PORT, BOARD_LED_RED_PIN, &LED_RED); | ||
335 | |||
336 | const port_pin_config_t LED_BLUE = {/* Internal pull-up/down resistor is disabled */ | ||
337 | kPORT_PullDisable, | ||
338 | /* Slow slew rate is configured */ | ||
339 | kPORT_SlowSlewRate, | ||
340 | /* Passive filter is disabled */ | ||
341 | kPORT_PassiveFilterDisable, | ||
342 | /* Open drain is disabled */ | ||
343 | kPORT_OpenDrainDisable, | ||
344 | /* Low drive strength is configured */ | ||
345 | kPORT_LowDriveStrength, | ||
346 | /* Pin is configured as PTE31 */ | ||
347 | kPORT_MuxAsGpio, | ||
348 | /* Pin Control Register fields [15:0] are not locked */ | ||
349 | kPORT_UnlockRegister}; | ||
350 | /* PORTE31 (pin 28) is configured as PTE31 */ | ||
351 | PORT_SetPinConfig(BOARD_LED_BLUE_PORT, BOARD_LED_BLUE_PIN, &LED_BLUE); | ||
352 | } | ||
353 | |||
354 | /* clang-format off */ | ||
355 | /* | ||
356 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
357 | BOARD_InitTOUCHPins: | ||
358 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
359 | - pin_list: | ||
360 | - {pin_num: '35', peripheral: TSI0, signal: 'CH, 2', pin_signal: TSI0_CH2/PTA1/LPUART0_RX/TPM2_CH0, slew_rate: fast, open_drain: disable, pull_select: down, pull_enable: disable} | ||
361 | - {pin_num: '36', peripheral: TSI0, signal: 'CH, 3', pin_signal: TSI0_CH3/PTA2/LPUART0_TX/TPM2_CH1, slew_rate: fast, open_drain: disable, pull_select: down, pull_enable: disable} | ||
362 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
363 | */ | ||
364 | /* clang-format on */ | ||
365 | |||
366 | /* FUNCTION ************************************************************************************************************ | ||
367 | * | ||
368 | * Function Name : BOARD_InitTOUCHPins | ||
369 | * Description : Configures pin routing and optionally pin electrical features. | ||
370 | * | ||
371 | * END ****************************************************************************************************************/ | ||
372 | void BOARD_InitTOUCHPins(void) | ||
373 | { | ||
374 | /* Clock Gate Control: Clock enabled */ | ||
375 | CLOCK_EnableClock(kCLOCK_PortA); | ||
376 | |||
377 | const port_pin_config_t TSI_ELECTRODE_1 = {/* Internal pull-up/down resistor is disabled */ | ||
378 | kPORT_PullDisable, | ||
379 | /* Fast slew rate is configured */ | ||
380 | kPORT_FastSlewRate, | ||
381 | /* Passive filter is disabled */ | ||
382 | kPORT_PassiveFilterDisable, | ||
383 | /* Open drain is disabled */ | ||
384 | kPORT_OpenDrainDisable, | ||
385 | /* Low drive strength is configured */ | ||
386 | kPORT_LowDriveStrength, | ||
387 | /* Pin is configured as TSI0_CH2 */ | ||
388 | kPORT_PinDisabledOrAnalog, | ||
389 | /* Pin Control Register fields [15:0] are not locked */ | ||
390 | kPORT_UnlockRegister}; | ||
391 | /* PORTA1 (pin 35) is configured as TSI0_CH2 */ | ||
392 | PORT_SetPinConfig(BOARD_TSI_ELECTRODE_1_PORT, BOARD_TSI_ELECTRODE_1_PIN, &TSI_ELECTRODE_1); | ||
393 | |||
394 | const port_pin_config_t TSI_ELECTRODE_2 = {/* Internal pull-up/down resistor is disabled */ | ||
395 | kPORT_PullDisable, | ||
396 | /* Fast slew rate is configured */ | ||
397 | kPORT_FastSlewRate, | ||
398 | /* Passive filter is disabled */ | ||
399 | kPORT_PassiveFilterDisable, | ||
400 | /* Open drain is disabled */ | ||
401 | kPORT_OpenDrainDisable, | ||
402 | /* Low drive strength is configured */ | ||
403 | kPORT_LowDriveStrength, | ||
404 | /* Pin is configured as TSI0_CH3 */ | ||
405 | kPORT_PinDisabledOrAnalog, | ||
406 | /* Pin Control Register fields [15:0] are not locked */ | ||
407 | kPORT_UnlockRegister}; | ||
408 | /* PORTA2 (pin 36) is configured as TSI0_CH3 */ | ||
409 | PORT_SetPinConfig(BOARD_TSI_ELECTRODE_2_PORT, BOARD_TSI_ELECTRODE_2_PIN, &TSI_ELECTRODE_2); | ||
410 | } | ||
411 | |||
412 | /* clang-format off */ | ||
413 | /* | ||
414 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
415 | BOARD_InitLIGHT_SENSORPins: | ||
416 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
417 | - pin_list: | ||
418 | - {pin_num: '98', peripheral: ADC0, signal: 'SE, 6b', pin_signal: ADC0_SE6b/PTD5/LPSPI1_SCK/LPUART2_TX/TPM0_CH5/LPUART0_CTS_b/FXIO0_D5, slew_rate: fast, open_drain: disable, | ||
419 | pull_select: down, pull_enable: disable} | ||
420 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
421 | */ | ||
422 | /* clang-format on */ | ||
423 | |||
424 | /* FUNCTION ************************************************************************************************************ | ||
425 | * | ||
426 | * Function Name : BOARD_InitLIGHT_SENSORPins | ||
427 | * Description : Configures pin routing and optionally pin electrical features. | ||
428 | * | ||
429 | * END ****************************************************************************************************************/ | ||
430 | void BOARD_InitLIGHT_SENSORPins(void) | ||
431 | { | ||
432 | /* Clock Gate Control: Clock enabled */ | ||
433 | CLOCK_EnableClock(kCLOCK_PortD); | ||
434 | |||
435 | /* PORTD5 (pin 98) is configured as ADC0_SE6b */ | ||
436 | PORT_SetPinMux(BOARD_LIGHT_SENSOR_PORT, BOARD_LIGHT_SENSOR_PIN, kPORT_PinDisabledOrAnalog); | ||
437 | |||
438 | PORTD->PCR[5] = | ||
439 | ((PORTD->PCR[5] & | ||
440 | /* Mask bits to zero which are setting */ | ||
441 | (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_ISF_MASK))) | ||
442 | |||
443 | /* Pull Select: Internal pulldown resistor is enabled on the corresponding pin, if the corresponding PE | ||
444 | * field is set. */ | ||
445 | | PORT_PCR_PS(kPORT_PullDown) | ||
446 | |||
447 | /* Pull Enable: Internal pullup or pulldown resistor is not enabled on the corresponding pin. */ | ||
448 | | PORT_PCR_PE(kPORT_PullDisable) | ||
449 | |||
450 | /* Slew Rate Enable: Fast slew rate is configured on the corresponding pin, if the pin is configured as | ||
451 | * a digital output. */ | ||
452 | | PORT_PCR_SRE(kPORT_FastSlewRate) | ||
453 | |||
454 | /* Open Drain Enable: Open drain output is disabled on the corresponding pin. */ | ||
455 | | PORT_PCR_ODE(kPORT_OpenDrainDisable)); | ||
456 | } | ||
457 | |||
458 | /* clang-format off */ | ||
459 | /* | ||
460 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
461 | BOARD_InitUSBPins: | ||
462 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
463 | - pin_list: | ||
464 | - {pin_num: '11', peripheral: USB0, signal: DM, pin_signal: USB0_DM} | ||
465 | - {pin_num: '10', peripheral: USB0, signal: DP, pin_signal: USB0_DP} | ||
466 | - {pin_num: '13', peripheral: USB0, signal: VREGIN, pin_signal: VREGIN} | ||
467 | - {pin_num: '79', peripheral: USB0, signal: SOF_OUT, pin_signal: CMP0_IN1/PTC7/LPSPI0_SIN/USB_SOF_OUT/FXIO0_D20, slew_rate: fast, open_drain: disable, pull_select: down, | ||
468 | pull_enable: disable} | ||
469 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
470 | */ | ||
471 | /* clang-format on */ | ||
472 | |||
473 | /* FUNCTION ************************************************************************************************************ | ||
474 | * | ||
475 | * Function Name : BOARD_InitUSBPins | ||
476 | * Description : Configures pin routing and optionally pin electrical features. | ||
477 | * | ||
478 | * END ****************************************************************************************************************/ | ||
479 | void BOARD_InitUSBPins(void) | ||
480 | { | ||
481 | /* Clock Gate Control: Clock enabled */ | ||
482 | CLOCK_EnableClock(kCLOCK_PortC); | ||
483 | |||
484 | const port_pin_config_t SOF_OUT = {/* Internal pull-up/down resistor is disabled */ | ||
485 | kPORT_PullDisable, | ||
486 | /* Fast slew rate is configured */ | ||
487 | kPORT_FastSlewRate, | ||
488 | /* Passive filter is disabled */ | ||
489 | kPORT_PassiveFilterDisable, | ||
490 | /* Open drain is disabled */ | ||
491 | kPORT_OpenDrainDisable, | ||
492 | /* Low drive strength is configured */ | ||
493 | kPORT_LowDriveStrength, | ||
494 | /* Pin is configured as USB_SOF_OUT */ | ||
495 | kPORT_MuxAlt3, | ||
496 | /* Pin Control Register fields [15:0] are not locked */ | ||
497 | kPORT_UnlockRegister}; | ||
498 | /* PORTC7 (pin 79) is configured as USB_SOF_OUT */ | ||
499 | PORT_SetPinConfig(BOARD_SOF_OUT_PORT, BOARD_SOF_OUT_PIN, &SOF_OUT); | ||
500 | } | ||
501 | |||
502 | /* clang-format off */ | ||
503 | /* | ||
504 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
505 | BOARD_InitDEBUG_UARTPins: | ||
506 | - options: {callFromInitBoot: 'true', prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
507 | - pin_list: | ||
508 | - {pin_num: '62', peripheral: LPUART0, signal: RX, pin_signal: TSI0_CH9/PTB16/LPSPI1_SOUT/LPUART0_RX/TPM0_CLKIN/LPSPI2_PCS3/FXIO0_D16, slew_rate: fast, open_drain: disable, | ||
509 | pull_select: down, pull_enable: disable} | ||
510 | - {pin_num: '63', peripheral: LPUART0, signal: TX, pin_signal: TSI0_CH10/PTB17/LPSPI1_SIN/LPUART0_TX/TPM1_CLKIN/LPSPI2_PCS2/FXIO0_D17, direction: OUTPUT, slew_rate: fast, | ||
511 | open_drain: disable, pull_select: down, pull_enable: disable} | ||
512 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
513 | */ | ||
514 | /* clang-format on */ | ||
515 | |||
516 | /* FUNCTION ************************************************************************************************************ | ||
517 | * | ||
518 | * Function Name : BOARD_InitDEBUG_UARTPins | ||
519 | * Description : Configures pin routing and optionally pin electrical features. | ||
520 | * | ||
521 | * END ****************************************************************************************************************/ | ||
522 | void BOARD_InitDEBUG_UARTPins(void) | ||
523 | { | ||
524 | /* Clock Gate Control: Clock enabled */ | ||
525 | CLOCK_EnableClock(kCLOCK_PortB); | ||
526 | |||
527 | const port_pin_config_t DEBUG_UART_RX = {/* Internal pull-up/down resistor is disabled */ | ||
528 | kPORT_PullDisable, | ||
529 | /* Fast slew rate is configured */ | ||
530 | kPORT_FastSlewRate, | ||
531 | /* Passive filter is disabled */ | ||
532 | kPORT_PassiveFilterDisable, | ||
533 | /* Open drain is disabled */ | ||
534 | kPORT_OpenDrainDisable, | ||
535 | /* Low drive strength is configured */ | ||
536 | kPORT_LowDriveStrength, | ||
537 | /* Pin is configured as LPUART0_RX */ | ||
538 | kPORT_MuxAlt3, | ||
539 | /* Pin Control Register fields [15:0] are not locked */ | ||
540 | kPORT_UnlockRegister}; | ||
541 | /* PORTB16 (pin 62) is configured as LPUART0_RX */ | ||
542 | PORT_SetPinConfig(BOARD_DEBUG_UART_RX_PORT, BOARD_DEBUG_UART_RX_PIN, &DEBUG_UART_RX); | ||
543 | |||
544 | const port_pin_config_t DEBUG_UART_TX = {/* Internal pull-up/down resistor is disabled */ | ||
545 | kPORT_PullDisable, | ||
546 | /* Fast slew rate is configured */ | ||
547 | kPORT_FastSlewRate, | ||
548 | /* Passive filter is disabled */ | ||
549 | kPORT_PassiveFilterDisable, | ||
550 | /* Open drain is disabled */ | ||
551 | kPORT_OpenDrainDisable, | ||
552 | /* Low drive strength is configured */ | ||
553 | kPORT_LowDriveStrength, | ||
554 | /* Pin is configured as LPUART0_TX */ | ||
555 | kPORT_MuxAlt3, | ||
556 | /* Pin Control Register fields [15:0] are not locked */ | ||
557 | kPORT_UnlockRegister}; | ||
558 | /* PORTB17 (pin 63) is configured as LPUART0_TX */ | ||
559 | PORT_SetPinConfig(BOARD_DEBUG_UART_TX_PORT, BOARD_DEBUG_UART_TX_PIN, &DEBUG_UART_TX); | ||
560 | } | ||
561 | |||
562 | /* clang-format off */ | ||
563 | /* | ||
564 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
565 | BOARD_InitACCELPins: | ||
566 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
567 | - pin_list: | ||
568 | - {pin_num: '32', peripheral: LPI2C0, signal: SDA, pin_signal: ADC0_SE21/PTE25/LLWU_P21/EMVSIM0_PD/TPM0_CH1/LPI2C0_SDA, identifier: ACCEL_SDA, slew_rate: fast, | ||
569 | open_drain: enable, pull_select: down, pull_enable: disable} | ||
570 | - {pin_num: '31', peripheral: LPI2C0, signal: SCL, pin_signal: ADC0_SE20/PTE24/EMVSIM0_IO/TPM0_CH0/LPI2C0_SCL, identifier: ACCEL_SCL, slew_rate: fast, open_drain: enable, | ||
571 | pull_select: down, pull_enable: disable} | ||
572 | - {pin_num: '97', peripheral: GPIOD, signal: 'GPIO, 4', pin_signal: PTD4/LLWU_P14/LPSPI1_PCS0/LPUART2_RX/TPM0_CH4/LPUART0_RTS_b/FXIO0_D4, direction: INPUT, slew_rate: fast, | ||
573 | open_drain: disable, pull_select: up, pull_enable: enable} | ||
574 | - {pin_num: '6', peripheral: GPIOE, signal: 'GPIO, 5', pin_signal: PTE5/LPSPI1_PCS1, direction: INPUT, slew_rate: fast, open_drain: disable, pull_select: up, pull_enable: enable} | ||
575 | - {pin_num: '33', peripheral: GPIOE, signal: 'GPIO, 26', pin_signal: PTE26/RTC_CLKOUT/TPM0_CH5/LPI2C0_SCLS/USB_CLKIN, identifier: ACCEL_RST, direction: OUTPUT, | ||
576 | slew_rate: slow, open_drain: disable, pull_select: down, pull_enable: disable} | ||
577 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
578 | */ | ||
579 | /* clang-format on */ | ||
580 | |||
581 | /* FUNCTION ************************************************************************************************************ | ||
582 | * | ||
583 | * Function Name : BOARD_InitACCELPins | ||
584 | * Description : Configures pin routing and optionally pin electrical features. | ||
585 | * | ||
586 | * END ****************************************************************************************************************/ | ||
587 | void BOARD_InitACCELPins(void) | ||
588 | { | ||
589 | /* Clock Gate Control: Clock enabled */ | ||
590 | CLOCK_EnableClock(kCLOCK_PortD); | ||
591 | /* Clock Gate Control: Clock enabled */ | ||
592 | CLOCK_EnableClock(kCLOCK_PortE); | ||
593 | |||
594 | gpio_pin_config_t ACCEL_INT1_config = { | ||
595 | .pinDirection = kGPIO_DigitalInput, | ||
596 | .outputLogic = 0U | ||
597 | }; | ||
598 | /* Initialize GPIO functionality on pin PTD4 (pin 97) */ | ||
599 | GPIO_PinInit(BOARD_ACCEL_INT1_GPIO, BOARD_ACCEL_INT1_PIN, &ACCEL_INT1_config); | ||
600 | |||
601 | gpio_pin_config_t ACCEL_INT2_config = { | ||
602 | .pinDirection = kGPIO_DigitalInput, | ||
603 | .outputLogic = 0U | ||
604 | }; | ||
605 | /* Initialize GPIO functionality on pin PTE5 (pin 6) */ | ||
606 | GPIO_PinInit(BOARD_ACCEL_INT2_GPIO, BOARD_ACCEL_INT2_PIN, &ACCEL_INT2_config); | ||
607 | |||
608 | gpio_pin_config_t ACCEL_RST_config = { | ||
609 | .pinDirection = kGPIO_DigitalOutput, | ||
610 | .outputLogic = 0U | ||
611 | }; | ||
612 | /* Initialize GPIO functionality on pin PTE26 (pin 33) */ | ||
613 | GPIO_PinInit(BOARD_ACCEL_RST_GPIO, BOARD_ACCEL_RST_PIN, &ACCEL_RST_config); | ||
614 | |||
615 | /* PORTD4 (pin 97) is configured as PTD4 */ | ||
616 | PORT_SetPinMux(BOARD_ACCEL_INT1_PORT, BOARD_ACCEL_INT1_PIN, kPORT_MuxAsGpio); | ||
617 | |||
618 | PORTD->PCR[4] = | ||
619 | ((PORTD->PCR[4] & | ||
620 | /* Mask bits to zero which are setting */ | ||
621 | (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_SRE_MASK | PORT_PCR_ODE_MASK | PORT_PCR_ISF_MASK))) | ||
622 | |||
623 | /* Pull Select: Internal pullup resistor is enabled on the corresponding pin, if the corresponding PE | ||
624 | * field is set. */ | ||
625 | | (uint32_t)(kPORT_PullUp) | ||
626 | |||
627 | /* Slew Rate Enable: Fast slew rate is configured on the corresponding pin, if the pin is configured as | ||
628 | * a digital output. */ | ||
629 | | PORT_PCR_SRE(kPORT_FastSlewRate) | ||
630 | |||
631 | /* Open Drain Enable: Open drain output is disabled on the corresponding pin. */ | ||
632 | | PORT_PCR_ODE(kPORT_OpenDrainDisable)); | ||
633 | |||
634 | const port_pin_config_t ACCEL_SCL = {/* Internal pull-up/down resistor is disabled */ | ||
635 | kPORT_PullDisable, | ||
636 | /* Fast slew rate is configured */ | ||
637 | kPORT_FastSlewRate, | ||
638 | /* Passive filter is disabled */ | ||
639 | kPORT_PassiveFilterDisable, | ||
640 | /* Open drain is enabled */ | ||
641 | kPORT_OpenDrainEnable, | ||
642 | /* Low drive strength is configured */ | ||
643 | kPORT_LowDriveStrength, | ||
644 | /* Pin is configured as LPI2C0_SCL */ | ||
645 | kPORT_MuxAlt5, | ||
646 | /* Pin Control Register fields [15:0] are not locked */ | ||
647 | kPORT_UnlockRegister}; | ||
648 | /* PORTE24 (pin 31) is configured as LPI2C0_SCL */ | ||
649 | PORT_SetPinConfig(BOARD_ACCEL_SCL_PORT, BOARD_ACCEL_SCL_PIN, &ACCEL_SCL); | ||
650 | |||
651 | const port_pin_config_t ACCEL_SDA = {/* Internal pull-up/down resistor is disabled */ | ||
652 | kPORT_PullDisable, | ||
653 | /* Fast slew rate is configured */ | ||
654 | kPORT_FastSlewRate, | ||
655 | /* Passive filter is disabled */ | ||
656 | kPORT_PassiveFilterDisable, | ||
657 | /* Open drain is enabled */ | ||
658 | kPORT_OpenDrainEnable, | ||
659 | /* Low drive strength is configured */ | ||
660 | kPORT_LowDriveStrength, | ||
661 | /* Pin is configured as LPI2C0_SDA */ | ||
662 | kPORT_MuxAlt5, | ||
663 | /* Pin Control Register fields [15:0] are not locked */ | ||
664 | kPORT_UnlockRegister}; | ||
665 | /* PORTE25 (pin 32) is configured as LPI2C0_SDA */ | ||
666 | PORT_SetPinConfig(BOARD_ACCEL_SDA_PORT, BOARD_ACCEL_SDA_PIN, &ACCEL_SDA); | ||
667 | |||
668 | const port_pin_config_t ACCEL_RST = {/* Internal pull-up/down resistor is disabled */ | ||
669 | kPORT_PullDisable, | ||
670 | /* Slow slew rate is configured */ | ||
671 | kPORT_SlowSlewRate, | ||
672 | /* Passive filter is disabled */ | ||
673 | kPORT_PassiveFilterDisable, | ||
674 | /* Open drain is disabled */ | ||
675 | kPORT_OpenDrainDisable, | ||
676 | /* Low drive strength is configured */ | ||
677 | kPORT_LowDriveStrength, | ||
678 | /* Pin is configured as PTE26 */ | ||
679 | kPORT_MuxAsGpio, | ||
680 | /* Pin Control Register fields [15:0] are not locked */ | ||
681 | kPORT_UnlockRegister}; | ||
682 | /* PORTE26 (pin 33) is configured as PTE26 */ | ||
683 | PORT_SetPinConfig(BOARD_ACCEL_RST_PORT, BOARD_ACCEL_RST_PIN, &ACCEL_RST); | ||
684 | |||
685 | const port_pin_config_t ACCEL_INT2 = {/* Internal pull-up resistor is enabled */ | ||
686 | kPORT_PullUp, | ||
687 | /* Fast slew rate is configured */ | ||
688 | kPORT_FastSlewRate, | ||
689 | /* Passive filter is disabled */ | ||
690 | kPORT_PassiveFilterDisable, | ||
691 | /* Open drain is disabled */ | ||
692 | kPORT_OpenDrainDisable, | ||
693 | /* Low drive strength is configured */ | ||
694 | kPORT_LowDriveStrength, | ||
695 | /* Pin is configured as PTE5 */ | ||
696 | kPORT_MuxAsGpio, | ||
697 | /* Pin Control Register fields [15:0] are not locked */ | ||
698 | kPORT_UnlockRegister}; | ||
699 | /* PORTE5 (pin 6) is configured as PTE5 */ | ||
700 | PORT_SetPinConfig(BOARD_ACCEL_INT2_PORT, BOARD_ACCEL_INT2_PIN, &ACCEL_INT2); | ||
701 | } | ||
702 | |||
703 | /* clang-format off */ | ||
704 | /* | ||
705 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
706 | BOARD_InitGYROPins: | ||
707 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
708 | - pin_list: | ||
709 | - {pin_num: '31', peripheral: LPI2C0, signal: SCL, pin_signal: ADC0_SE20/PTE24/EMVSIM0_IO/TPM0_CH0/LPI2C0_SCL, identifier: GYRO_SCL, slew_rate: fast, open_drain: enable, | ||
710 | pull_select: down, pull_enable: disable} | ||
711 | - {pin_num: '32', peripheral: LPI2C0, signal: SDA, pin_signal: ADC0_SE21/PTE25/LLWU_P21/EMVSIM0_PD/TPM0_CH1/LPI2C0_SDA, identifier: GYRO_SDA, slew_rate: fast, open_drain: enable, | ||
712 | pull_select: down, pull_enable: disable} | ||
713 | - {pin_num: '1', peripheral: GPIOE, signal: 'GPIO, 0', pin_signal: ADC0_SE16/PTE0/RTC_CLKOUT/LPSPI1_SIN/LPUART1_TX/CMP0_OUT/LPI2C1_SDA, direction: INPUT, slew_rate: fast, | ||
714 | open_drain: disable, pull_select: up, pull_enable: enable} | ||
715 | - {pin_num: '2', peripheral: GPIOE, signal: 'GPIO, 1', pin_signal: ADC0_SE17/PTE1/LLWU_P0/LPSPI1_SOUT/LPUART1_RX/LPI2C1_SCL, direction: INPUT, slew_rate: fast, | ||
716 | open_drain: disable, pull_select: up, pull_enable: enable} | ||
717 | - {pin_num: '33', peripheral: GPIOE, signal: 'GPIO, 26', pin_signal: PTE26/RTC_CLKOUT/TPM0_CH5/LPI2C0_SCLS/USB_CLKIN, identifier: GYRO_RST, direction: OUTPUT, slew_rate: slow, | ||
718 | open_drain: disable, pull_select: down, pull_enable: disable} | ||
719 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
720 | */ | ||
721 | /* clang-format on */ | ||
722 | |||
723 | /* FUNCTION ************************************************************************************************************ | ||
724 | * | ||
725 | * Function Name : BOARD_InitGYROPins | ||
726 | * Description : Configures pin routing and optionally pin electrical features. | ||
727 | * | ||
728 | * END ****************************************************************************************************************/ | ||
729 | void BOARD_InitGYROPins(void) | ||
730 | { | ||
731 | /* Clock Gate Control: Clock enabled */ | ||
732 | CLOCK_EnableClock(kCLOCK_PortE); | ||
733 | |||
734 | gpio_pin_config_t GYRO_INT1_config = { | ||
735 | .pinDirection = kGPIO_DigitalInput, | ||
736 | .outputLogic = 0U | ||
737 | }; | ||
738 | /* Initialize GPIO functionality on pin PTE0 (pin 1) */ | ||
739 | GPIO_PinInit(BOARD_GYRO_INT1_GPIO, BOARD_GYRO_INT1_PIN, &GYRO_INT1_config); | ||
740 | |||
741 | gpio_pin_config_t GYRO_INT2_config = { | ||
742 | .pinDirection = kGPIO_DigitalInput, | ||
743 | .outputLogic = 0U | ||
744 | }; | ||
745 | /* Initialize GPIO functionality on pin PTE1 (pin 2) */ | ||
746 | GPIO_PinInit(BOARD_GYRO_INT2_GPIO, BOARD_GYRO_INT2_PIN, &GYRO_INT2_config); | ||
747 | |||
748 | gpio_pin_config_t GYRO_RST_config = { | ||
749 | .pinDirection = kGPIO_DigitalOutput, | ||
750 | .outputLogic = 0U | ||
751 | }; | ||
752 | /* Initialize GPIO functionality on pin PTE26 (pin 33) */ | ||
753 | GPIO_PinInit(BOARD_GYRO_RST_GPIO, BOARD_GYRO_RST_PIN, &GYRO_RST_config); | ||
754 | |||
755 | const port_pin_config_t GYRO_INT1 = {/* Internal pull-up resistor is enabled */ | ||
756 | kPORT_PullUp, | ||
757 | /* Fast slew rate is configured */ | ||
758 | kPORT_FastSlewRate, | ||
759 | /* Passive filter is disabled */ | ||
760 | kPORT_PassiveFilterDisable, | ||
761 | /* Open drain is disabled */ | ||
762 | kPORT_OpenDrainDisable, | ||
763 | /* Low drive strength is configured */ | ||
764 | kPORT_LowDriveStrength, | ||
765 | /* Pin is configured as PTE0 */ | ||
766 | kPORT_MuxAsGpio, | ||
767 | /* Pin Control Register fields [15:0] are not locked */ | ||
768 | kPORT_UnlockRegister}; | ||
769 | /* PORTE0 (pin 1) is configured as PTE0 */ | ||
770 | PORT_SetPinConfig(BOARD_GYRO_INT1_PORT, BOARD_GYRO_INT1_PIN, &GYRO_INT1); | ||
771 | |||
772 | const port_pin_config_t GYRO_INT2 = {/* Internal pull-up resistor is enabled */ | ||
773 | kPORT_PullUp, | ||
774 | /* Fast slew rate is configured */ | ||
775 | kPORT_FastSlewRate, | ||
776 | /* Passive filter is disabled */ | ||
777 | kPORT_PassiveFilterDisable, | ||
778 | /* Open drain is disabled */ | ||
779 | kPORT_OpenDrainDisable, | ||
780 | /* Low drive strength is configured */ | ||
781 | kPORT_LowDriveStrength, | ||
782 | /* Pin is configured as PTE1 */ | ||
783 | kPORT_MuxAsGpio, | ||
784 | /* Pin Control Register fields [15:0] are not locked */ | ||
785 | kPORT_UnlockRegister}; | ||
786 | /* PORTE1 (pin 2) is configured as PTE1 */ | ||
787 | PORT_SetPinConfig(BOARD_GYRO_INT2_PORT, BOARD_GYRO_INT2_PIN, &GYRO_INT2); | ||
788 | |||
789 | const port_pin_config_t GYRO_SCL = {/* Internal pull-up/down resistor is disabled */ | ||
790 | kPORT_PullDisable, | ||
791 | /* Fast slew rate is configured */ | ||
792 | kPORT_FastSlewRate, | ||
793 | /* Passive filter is disabled */ | ||
794 | kPORT_PassiveFilterDisable, | ||
795 | /* Open drain is enabled */ | ||
796 | kPORT_OpenDrainEnable, | ||
797 | /* Low drive strength is configured */ | ||
798 | kPORT_LowDriveStrength, | ||
799 | /* Pin is configured as LPI2C0_SCL */ | ||
800 | kPORT_MuxAlt5, | ||
801 | /* Pin Control Register fields [15:0] are not locked */ | ||
802 | kPORT_UnlockRegister}; | ||
803 | /* PORTE24 (pin 31) is configured as LPI2C0_SCL */ | ||
804 | PORT_SetPinConfig(BOARD_GYRO_SCL_PORT, BOARD_GYRO_SCL_PIN, &GYRO_SCL); | ||
805 | |||
806 | const port_pin_config_t GYRO_SDA = {/* Internal pull-up/down resistor is disabled */ | ||
807 | kPORT_PullDisable, | ||
808 | /* Fast slew rate is configured */ | ||
809 | kPORT_FastSlewRate, | ||
810 | /* Passive filter is disabled */ | ||
811 | kPORT_PassiveFilterDisable, | ||
812 | /* Open drain is enabled */ | ||
813 | kPORT_OpenDrainEnable, | ||
814 | /* Low drive strength is configured */ | ||
815 | kPORT_LowDriveStrength, | ||
816 | /* Pin is configured as LPI2C0_SDA */ | ||
817 | kPORT_MuxAlt5, | ||
818 | /* Pin Control Register fields [15:0] are not locked */ | ||
819 | kPORT_UnlockRegister}; | ||
820 | /* PORTE25 (pin 32) is configured as LPI2C0_SDA */ | ||
821 | PORT_SetPinConfig(BOARD_GYRO_SDA_PORT, BOARD_GYRO_SDA_PIN, &GYRO_SDA); | ||
822 | |||
823 | const port_pin_config_t GYRO_RST = {/* Internal pull-up/down resistor is disabled */ | ||
824 | kPORT_PullDisable, | ||
825 | /* Slow slew rate is configured */ | ||
826 | kPORT_SlowSlewRate, | ||
827 | /* Passive filter is disabled */ | ||
828 | kPORT_PassiveFilterDisable, | ||
829 | /* Open drain is disabled */ | ||
830 | kPORT_OpenDrainDisable, | ||
831 | /* Low drive strength is configured */ | ||
832 | kPORT_LowDriveStrength, | ||
833 | /* Pin is configured as PTE26 */ | ||
834 | kPORT_MuxAsGpio, | ||
835 | /* Pin Control Register fields [15:0] are not locked */ | ||
836 | kPORT_UnlockRegister}; | ||
837 | /* PORTE26 (pin 33) is configured as PTE26 */ | ||
838 | PORT_SetPinConfig(BOARD_GYRO_RST_PORT, BOARD_GYRO_RST_PIN, &GYRO_RST); | ||
839 | } | ||
840 | |||
841 | /* clang-format off */ | ||
842 | /* | ||
843 | * TEXT BELOW IS USED AS SETTING FOR TOOLS ************************************* | ||
844 | BOARD_InitOSCPins: | ||
845 | - options: {prefix: BOARD_, coreID: core0, enableClock: 'true'} | ||
846 | - pin_list: | ||
847 | - {pin_num: '50', peripheral: SCG, signal: EXTAL0, pin_signal: EXTAL0/PTA18/LPUART1_RX/TPM0_CLKIN, slew_rate: fast, open_drain: disable, pull_select: down, pull_enable: disable} | ||
848 | - {pin_num: '51', peripheral: SCG, signal: XTAL0, pin_signal: XTAL0/PTA19/LPUART1_TX/TPM1_CLKIN/LPTMR0_ALT1/LPTMR1_ALT1, slew_rate: fast, open_drain: disable, pull_select: down, | ||
849 | pull_enable: disable} | ||
850 | * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS *********** | ||
851 | */ | ||
852 | /* clang-format on */ | ||
853 | |||
854 | /* FUNCTION ************************************************************************************************************ | ||
855 | * | ||
856 | * Function Name : BOARD_InitOSCPins | ||
857 | * Description : Configures pin routing and optionally pin electrical features. | ||
858 | * | ||
859 | * END ****************************************************************************************************************/ | ||
860 | void BOARD_InitOSCPins(void) | ||
861 | { | ||
862 | /* Clock Gate Control: Clock enabled */ | ||
863 | CLOCK_EnableClock(kCLOCK_PortA); | ||
864 | |||
865 | const port_pin_config_t EXTAL0 = {/* Internal pull-up/down resistor is disabled */ | ||
866 | kPORT_PullDisable, | ||
867 | /* Fast slew rate is configured */ | ||
868 | kPORT_FastSlewRate, | ||
869 | /* Passive filter is disabled */ | ||
870 | kPORT_PassiveFilterDisable, | ||
871 | /* Open drain is disabled */ | ||
872 | kPORT_OpenDrainDisable, | ||
873 | /* Low drive strength is configured */ | ||
874 | kPORT_LowDriveStrength, | ||
875 | /* Pin is configured as EXTAL0 */ | ||
876 | kPORT_PinDisabledOrAnalog, | ||
877 | /* Pin Control Register fields [15:0] are not locked */ | ||
878 | kPORT_UnlockRegister}; | ||
879 | /* PORTA18 (pin 50) is configured as EXTAL0 */ | ||
880 | PORT_SetPinConfig(BOARD_EXTAL0_PORT, BOARD_EXTAL0_PIN, &EXTAL0); | ||
881 | |||
882 | const port_pin_config_t XTAL0 = {/* Internal pull-up/down resistor is disabled */ | ||
883 | kPORT_PullDisable, | ||
884 | /* Fast slew rate is configured */ | ||
885 | kPORT_FastSlewRate, | ||
886 | /* Passive filter is disabled */ | ||
887 | kPORT_PassiveFilterDisable, | ||
888 | /* Open drain is disabled */ | ||
889 | kPORT_OpenDrainDisable, | ||
890 | /* Low drive strength is configured */ | ||
891 | kPORT_LowDriveStrength, | ||
892 | /* Pin is configured as XTAL0 */ | ||
893 | kPORT_PinDisabledOrAnalog, | ||
894 | /* Pin Control Register fields [15:0] are not locked */ | ||
895 | kPORT_UnlockRegister}; | ||
896 | /* PORTA19 (pin 51) is configured as XTAL0 */ | ||
897 | PORT_SetPinConfig(BOARD_XTAL0_PORT, BOARD_XTAL0_PIN, &XTAL0); | ||
898 | } | ||
899 | /*********************************************************************************************************************** | ||
900 | * EOF | ||
901 | **********************************************************************************************************************/ | ||