1 /*
2  * Copyright 2017-2021 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 v8.0
18 processor: LPC55S06
19 package_id: LPC55S06JBD64
20 mcu_data: ksdk2_0
21 processor_version: 0.9.5
22 board: LPCXpresso55S06
23  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
24  */
25 /* clang-format on */
26 
27 #include "fsl_common.h"
28 #include "fsl_gpio.h"
29 #include "fsl_iocon.h"
30 #include "pin_mux.h"
31 
32 /* FUNCTION ************************************************************************************************************
33  *
34  * Function Name : BOARD_InitBootPins
35  * Description   : Calls initialization functions.
36  *
37  * END ****************************************************************************************************************/
BOARD_InitBootPins(void)38 void BOARD_InitBootPins(void)
39 {
40     BOARD_InitDEBUG_UARTPins();
41 }
42 
43 /* clang-format off */
44 /*
45  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
46 BOARD_InitPins:
47 - options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
48 - pin_list: []
49  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
50  */
51 /* clang-format on */
52 
53 /* FUNCTION ************************************************************************************************************
54  *
55  * Function Name : BOARD_InitPins
56  * Description   : Configures pin routing and optionally pin electrical features.
57  *
58  * END ****************************************************************************************************************/
59 /* Function assigned for the Cortex-M33 */
BOARD_InitPins(void)60 void BOARD_InitPins(void)
61 {
62 }
63 
64 /* clang-format off */
65 /*
66  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
67 BOARD_InitDEBUG_UARTPins:
68 - options: {callFromInitBoot: 'true', coreID: cm33_core0, enableClock: 'true'}
69 - pin_list:
70   - {pin_num: '61', peripheral: FLEXCOMM0, signal: RXD_SDA_MOSI_DATA, pin_signal: PIO0_29/FC0_RXD_SDA_MOSI_DATA/CTIMER2_MAT3/SCT0_OUT8/CMP0_OUT/PLU_OUT2/SECURE_GPIO0_29,
71     mode: inactive, slew_rate: standard, invert: disabled, open_drain: disabled}
72   - {pin_num: '63', peripheral: FLEXCOMM0, signal: TXD_SCL_MISO_WS, pin_signal: PIO0_30/FC0_TXD_SCL_MISO_WS/CTIMER0_MAT0/SCT0_OUT9/SECURE_GPIO0_30, mode: inactive,
73     slew_rate: standard, invert: disabled, open_drain: disabled}
74  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
75  */
76 /* clang-format on */
77 
78 /* FUNCTION ************************************************************************************************************
79  *
80  * Function Name : BOARD_InitDEBUG_UARTPins
81  * Description   : Configures pin routing and optionally pin electrical features.
82  *
83  * END ****************************************************************************************************************/
84 /* Function assigned for the Cortex-M33 */
BOARD_InitDEBUG_UARTPins(void)85 void BOARD_InitDEBUG_UARTPins(void)
86 {
87     /* Enables the clock for the I/O controller.: Enable Clock. */
88     CLOCK_EnableClock(kCLOCK_Iocon);
89 
90     const uint32_t port0_pin29_config = (/* Pin is configured as FC0_RXD_SDA_MOSI_DATA */
91                                          IOCON_PIO_FUNC1 |
92                                          /* No addition pin function */
93                                          IOCON_PIO_MODE_INACT |
94                                          /* Standard mode, output slew rate control is enabled */
95                                          IOCON_PIO_SLEW_STANDARD |
96                                          /* Input function is not inverted */
97                                          IOCON_PIO_INV_DI |
98                                          /* Enables digital function */
99                                          IOCON_PIO_DIGITAL_EN |
100                                          /* Open drain is disabled */
101                                          IOCON_PIO_OPENDRAIN_DI);
102     /* PORT0 PIN29 (coords: 61) is configured as FC0_RXD_SDA_MOSI_DATA */
103     IOCON_PinMuxSet(IOCON, 0U, 29U, port0_pin29_config);
104 
105     const uint32_t port0_pin30_config = (/* Pin is configured as FC0_TXD_SCL_MISO_WS */
106                                          IOCON_PIO_FUNC1 |
107                                          /* No addition pin function */
108                                          IOCON_PIO_MODE_INACT |
109                                          /* Standard mode, output slew rate control is enabled */
110                                          IOCON_PIO_SLEW_STANDARD |
111                                          /* Input function is not inverted */
112                                          IOCON_PIO_INV_DI |
113                                          /* Enables digital function */
114                                          IOCON_PIO_DIGITAL_EN |
115                                          /* Open drain is disabled */
116                                          IOCON_PIO_OPENDRAIN_DI);
117     /* PORT0 PIN30 (coords: 63) is configured as FC0_TXD_SCL_MISO_WS */
118     IOCON_PinMuxSet(IOCON, 0U, 30U, port0_pin30_config);
119 }
120 
121 /* clang-format off */
122 /*
123  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
124 BOARD_InitSWD_DEBUGPins:
125 - options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
126 - pin_list:
127   - {pin_num: '13', peripheral: SWD, signal: SWO, pin_signal: PIO0_10/FC6_SCK/CT_INP10/CTIMER2_MAT0/FC1_TXD_SCL_MISO_WS/SCT0_OUT2/SWO/SECURE_GPIO0_10/ADC0_1, mode: inactive,
128     slew_rate: standard, invert: disabled, open_drain: disabled, asw: disabled}
129   - {pin_num: '6', peripheral: SWD, signal: SWCLK, pin_signal: PIO0_11/FC6_RXD_SDA_MOSI_DATA/CTIMER2_MAT2/FREQME_GPIO_CLK_A/SWCLK/SECURE_GPIO0_11/ADC0_9, mode: pullDown,
130     slew_rate: standard, invert: disabled, open_drain: disabled, asw: disabled}
131   - {pin_num: '5', peripheral: SWD, signal: SWDIO, pin_signal: PIO0_12/FC3_TXD_SCL_MISO_WS/FREQME_GPIO_CLK_B/SCT_GPI7/SWDIO/FC6_TXD_SCL_MISO_WS/SECURE_GPIO0_12/ADC0_10,
132     mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled, asw: disabled}
133  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
134  */
135 /* clang-format on */
136 
137 /* FUNCTION ************************************************************************************************************
138  *
139  * Function Name : BOARD_InitSWD_DEBUGPins
140  * Description   : Configures pin routing and optionally pin electrical features.
141  *
142  * END ****************************************************************************************************************/
143 /* Function assigned for the Cortex-M33 */
BOARD_InitSWD_DEBUGPins(void)144 void BOARD_InitSWD_DEBUGPins(void)
145 {
146     /* Enables the clock for the I/O controller.: Enable Clock. */
147     CLOCK_EnableClock(kCLOCK_Iocon);
148 
149     const uint32_t port0_pin10_config = (/* Pin is configured as SWO */
150                                          IOCON_PIO_FUNC6 |
151                                          /* No addition pin function */
152                                          IOCON_PIO_MODE_INACT |
153                                          /* Standard mode, output slew rate control is enabled */
154                                          IOCON_PIO_SLEW_STANDARD |
155                                          /* Input function is not inverted */
156                                          IOCON_PIO_INV_DI |
157                                          /* Enables digital function */
158                                          IOCON_PIO_DIGITAL_EN |
159                                          /* Open drain is disabled */
160                                          IOCON_PIO_OPENDRAIN_DI |
161                                          /* Analog switch is open (disabled) */
162                                          IOCON_PIO_ASW_DI);
163     /* PORT0 PIN10 (coords: 13) is configured as SWO */
164     IOCON_PinMuxSet(IOCON, 0U, 10U, port0_pin10_config);
165 
166     const uint32_t port0_pin11_config = (/* Pin is configured as SWCLK */
167                                          IOCON_PIO_FUNC6 |
168                                          /* Selects pull-down function */
169                                          IOCON_PIO_MODE_PULLDOWN |
170                                          /* Standard mode, output slew rate control is enabled */
171                                          IOCON_PIO_SLEW_STANDARD |
172                                          /* Input function is not inverted */
173                                          IOCON_PIO_INV_DI |
174                                          /* Enables digital function */
175                                          IOCON_PIO_DIGITAL_EN |
176                                          /* Open drain is disabled */
177                                          IOCON_PIO_OPENDRAIN_DI |
178                                          /* Analog switch is open (disabled) */
179                                          IOCON_PIO_ASW_DI);
180     /* PORT0 PIN11 (coords: 6) is configured as SWCLK */
181     IOCON_PinMuxSet(IOCON, 0U, 11U, port0_pin11_config);
182 
183     const uint32_t port0_pin12_config = (/* Pin is configured as SWDIO */
184                                          IOCON_PIO_FUNC6 |
185                                          /* Selects pull-up function */
186                                          IOCON_PIO_MODE_PULLUP |
187                                          /* Standard mode, output slew rate control is enabled */
188                                          IOCON_PIO_SLEW_STANDARD |
189                                          /* Input function is not inverted */
190                                          IOCON_PIO_INV_DI |
191                                          /* Enables digital function */
192                                          IOCON_PIO_DIGITAL_EN |
193                                          /* Open drain is disabled */
194                                          IOCON_PIO_OPENDRAIN_DI |
195                                          /* Analog switch is open (disabled) */
196                                          IOCON_PIO_ASW_DI);
197     /* PORT0 PIN12 (coords: 5) is configured as SWDIO */
198     IOCON_PinMuxSet(IOCON, 0U, 12U, port0_pin12_config);
199 }
200 
201 /* clang-format off */
202 /*
203  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
204 BOARD_InitLEDsPins:
205 - options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
206 - pin_list:
207   - {pin_num: '38', peripheral: GPIO, signal: 'PIO0, 18', pin_signal: PIO0_18/FC4_CTS_SDA_SSEL0/CTIMER1_MAT0/SCT0_OUT1/PLU_IN3/SECURE_GPIO0_18/ACMP0_C, direction: OUTPUT,
208     gpio_init_state: 'false', mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled, asw: disabled}
209   - {pin_num: '49', peripheral: GPIO, signal: 'PIO0, 21', pin_signal: PIO0_21/FC3_RTS_SCL_SSEL1/UTICK_CAP3/CTIMER3_MAT3/SCT_GPI3/FC7_SCK/HS_SPI_SSEL3/PLU_CLKIN/SECURE_GPIO0_21,
210     direction: OUTPUT, gpio_init_state: 'false', mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled}
211   - {pin_num: '51', peripheral: GPIO, signal: 'PIO0, 22', pin_signal: PIO0_22/FC6_TXD_SCL_MISO_WS/UTICK_CAP1/CT_INP15/SCT0_OUT3/PLU_OUT7/SECURE_GPIO0_22, direction: OUTPUT,
212     gpio_init_state: 'false', mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled}
213  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
214  */
215 /* clang-format on */
216 
217 /* FUNCTION ************************************************************************************************************
218  *
219  * Function Name : BOARD_InitLEDsPins
220  * Description   : Configures pin routing and optionally pin electrical features.
221  *
222  * END ****************************************************************************************************************/
223 /* Function assigned for the Cortex-M33 */
BOARD_InitLEDsPins(void)224 void BOARD_InitLEDsPins(void)
225 {
226     /* Enables the clock for the I/O controller.: Enable Clock. */
227     CLOCK_EnableClock(kCLOCK_Iocon);
228 
229     /* Enables the clock for the GPIO0 module */
230     CLOCK_EnableClock(kCLOCK_Gpio0);
231 
232     gpio_pin_config_t LED_GREEN_config = {
233         .pinDirection = kGPIO_DigitalOutput,
234         .outputLogic = 0U
235     };
236     /* Initialize GPIO functionality on pin PIO0_18 (pin 38)  */
237     GPIO_PinInit(BOARD_INITLEDSPINS_LED_GREEN_GPIO, BOARD_INITLEDSPINS_LED_GREEN_PORT, BOARD_INITLEDSPINS_LED_GREEN_PIN, &LED_GREEN_config);
238 
239     gpio_pin_config_t LED_RED_config = {
240         .pinDirection = kGPIO_DigitalOutput,
241         .outputLogic = 0U
242     };
243     /* Initialize GPIO functionality on pin PIO0_21 (pin 49)  */
244     GPIO_PinInit(BOARD_INITLEDSPINS_LED_RED_GPIO, BOARD_INITLEDSPINS_LED_RED_PORT, BOARD_INITLEDSPINS_LED_RED_PIN, &LED_RED_config);
245 
246     gpio_pin_config_t LED_BLUE_config = {
247         .pinDirection = kGPIO_DigitalOutput,
248         .outputLogic = 0U
249     };
250     /* Initialize GPIO functionality on pin PIO0_22 (pin 51)  */
251     GPIO_PinInit(BOARD_INITLEDSPINS_LED_BLUE_GPIO, BOARD_INITLEDSPINS_LED_BLUE_PORT, BOARD_INITLEDSPINS_LED_BLUE_PIN, &LED_BLUE_config);
252 
253     const uint32_t LED_GREEN = (/* Pin is configured as PIO0_18 */
254                                 IOCON_PIO_FUNC0 |
255                                 /* Selects pull-up function */
256                                 IOCON_PIO_MODE_PULLUP |
257                                 /* Standard mode, output slew rate control is enabled */
258                                 IOCON_PIO_SLEW_STANDARD |
259                                 /* Input function is not inverted */
260                                 IOCON_PIO_INV_DI |
261                                 /* Enables digital function */
262                                 IOCON_PIO_DIGITAL_EN |
263                                 /* Open drain is disabled */
264                                 IOCON_PIO_OPENDRAIN_DI |
265                                 /* Analog switch is open (disabled) */
266                                 IOCON_PIO_ASW_DI);
267     /* PORT0 PIN18 (coords: 38) is configured as PIO0_18 */
268     IOCON_PinMuxSet(IOCON, BOARD_INITLEDSPINS_LED_GREEN_PORT, BOARD_INITLEDSPINS_LED_GREEN_PIN, LED_GREEN);
269 
270     const uint32_t LED_RED = (/* Pin is configured as PIO0_21 */
271                               IOCON_PIO_FUNC0 |
272                               /* Selects pull-up function */
273                               IOCON_PIO_MODE_PULLUP |
274                               /* Standard mode, output slew rate control is enabled */
275                               IOCON_PIO_SLEW_STANDARD |
276                               /* Input function is not inverted */
277                               IOCON_PIO_INV_DI |
278                               /* Enables digital function */
279                               IOCON_PIO_DIGITAL_EN |
280                               /* Open drain is disabled */
281                               IOCON_PIO_OPENDRAIN_DI);
282     /* PORT0 PIN21 (coords: 49) is configured as PIO0_21 */
283     IOCON_PinMuxSet(IOCON, BOARD_INITLEDSPINS_LED_RED_PORT, BOARD_INITLEDSPINS_LED_RED_PIN, LED_RED);
284 
285     const uint32_t LED_BLUE = (/* Pin is configured as PIO0_22 */
286                                IOCON_PIO_FUNC0 |
287                                /* Selects pull-up function */
288                                IOCON_PIO_MODE_PULLUP |
289                                /* Standard mode, output slew rate control is enabled */
290                                IOCON_PIO_SLEW_STANDARD |
291                                /* Input function is not inverted */
292                                IOCON_PIO_INV_DI |
293                                /* Enables digital function */
294                                IOCON_PIO_DIGITAL_EN |
295                                /* Open drain is disabled */
296                                IOCON_PIO_OPENDRAIN_DI);
297     /* PORT0 PIN22 (coords: 51) is configured as PIO0_22 */
298     IOCON_PinMuxSet(IOCON, BOARD_INITLEDSPINS_LED_BLUE_PORT, BOARD_INITLEDSPINS_LED_BLUE_PIN, LED_BLUE);
299 }
300 
301 /* clang-format off */
302 /*
303  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
304 BOARD_InitBUTTONsPins:
305 - options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
306 - pin_list:
307   - {pin_num: '3', peripheral: GPIO, signal: 'PIO1, 9', pin_signal: PIO1_9/FC1_SCK/CT_INP4/SCT0_OUT2/FC4_CTS_SDA_SSEL0/ADC0_12, identifier: USR, direction: INPUT,
308     mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled, asw: disabled}
309   - {pin_num: '44', peripheral: GPIO, signal: 'PIO0, 28', pin_signal: PIO0_28/FC0_SCK/CT_INP11/SCT0_OUT7/PLU_OUT1/SECURE_GPIO0_28, identifier: WAKEUP, direction: INPUT,
310     mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled}
311   - {pin_num: '58', peripheral: GPIO, signal: 'PIO0, 5', pin_signal: PIO0_5/CAN0_TD/FC4_RXD_SDA_MOSI_DATA/CTIMER3_MAT0/SCT_GPI5/FC3_RTS_SCL_SSEL1/MCLK/SECURE_GPIO0_5,
312     identifier: ISP, direction: INPUT, mode: pullUp, slew_rate: standard, invert: disabled, open_drain: disabled}
313   - {pin_num: '23', peripheral: SYSCON, signal: RESET, pin_signal: RESETN, identifier: RESET}
314  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
315  */
316 /* clang-format on */
317 
318 /* FUNCTION ************************************************************************************************************
319  *
320  * Function Name : BOARD_InitBUTTONsPins
321  * Description   : Configures pin routing and optionally pin electrical features.
322  *
323  * END ****************************************************************************************************************/
324 /* Function assigned for the Cortex-M33 */
BOARD_InitBUTTONsPins(void)325 void BOARD_InitBUTTONsPins(void)
326 {
327     /* Enables the clock for the I/O controller.: Enable Clock. */
328     CLOCK_EnableClock(kCLOCK_Iocon);
329 
330     /* Enables the clock for the GPIO0 module */
331     CLOCK_EnableClock(kCLOCK_Gpio0);
332 
333     /* Enables the clock for the GPIO1 module */
334     CLOCK_EnableClock(kCLOCK_Gpio1);
335 
336     gpio_pin_config_t ISP_config = {
337         .pinDirection = kGPIO_DigitalInput,
338         .outputLogic = 0U
339     };
340     /* Initialize GPIO functionality on pin PIO0_5 (pin 58)  */
341     GPIO_PinInit(BOARD_INITBUTTONSPINS_ISP_GPIO, BOARD_INITBUTTONSPINS_ISP_PORT, BOARD_INITBUTTONSPINS_ISP_PIN, &ISP_config);
342 
343     gpio_pin_config_t WAKEUP_config = {
344         .pinDirection = kGPIO_DigitalInput,
345         .outputLogic = 0U
346     };
347     /* Initialize GPIO functionality on pin PIO0_28 (pin 44)  */
348     GPIO_PinInit(BOARD_INITBUTTONSPINS_WAKEUP_GPIO, BOARD_INITBUTTONSPINS_WAKEUP_PORT, BOARD_INITBUTTONSPINS_WAKEUP_PIN, &WAKEUP_config);
349 
350     gpio_pin_config_t USR_config = {
351         .pinDirection = kGPIO_DigitalInput,
352         .outputLogic = 0U
353     };
354     /* Initialize GPIO functionality on pin PIO1_9 (pin 3)  */
355     GPIO_PinInit(BOARD_INITBUTTONSPINS_USR_GPIO, BOARD_INITBUTTONSPINS_USR_PORT, BOARD_INITBUTTONSPINS_USR_PIN, &USR_config);
356 
357     const uint32_t WAKEUP = (/* Pin is configured as PIO0_28 */
358                              IOCON_PIO_FUNC0 |
359                              /* Selects pull-up function */
360                              IOCON_PIO_MODE_PULLUP |
361                              /* Standard mode, output slew rate control is enabled */
362                              IOCON_PIO_SLEW_STANDARD |
363                              /* Input function is not inverted */
364                              IOCON_PIO_INV_DI |
365                              /* Enables digital function */
366                              IOCON_PIO_DIGITAL_EN |
367                              /* Open drain is disabled */
368                              IOCON_PIO_OPENDRAIN_DI);
369     /* PORT0 PIN28 (coords: 44) is configured as PIO0_28 */
370     IOCON_PinMuxSet(IOCON, BOARD_INITBUTTONSPINS_WAKEUP_PORT, BOARD_INITBUTTONSPINS_WAKEUP_PIN, WAKEUP);
371 
372     const uint32_t ISP = (/* Pin is configured as PIO0_5 */
373                           IOCON_PIO_FUNC0 |
374                           /* Selects pull-up function */
375                           IOCON_PIO_MODE_PULLUP |
376                           /* Standard mode, output slew rate control is enabled */
377                           IOCON_PIO_SLEW_STANDARD |
378                           /* Input function is not inverted */
379                           IOCON_PIO_INV_DI |
380                           /* Enables digital function */
381                           IOCON_PIO_DIGITAL_EN |
382                           /* Open drain is disabled */
383                           IOCON_PIO_OPENDRAIN_DI);
384     /* PORT0 PIN5 (coords: 58) is configured as PIO0_5 */
385     IOCON_PinMuxSet(IOCON, BOARD_INITBUTTONSPINS_ISP_PORT, BOARD_INITBUTTONSPINS_ISP_PIN, ISP);
386 
387     const uint32_t USR = (/* Pin is configured as PIO1_9 */
388                           IOCON_PIO_FUNC0 |
389                           /* Selects pull-up function */
390                           IOCON_PIO_MODE_PULLUP |
391                           /* Standard mode, output slew rate control is enabled */
392                           IOCON_PIO_SLEW_STANDARD |
393                           /* Input function is not inverted */
394                           IOCON_PIO_INV_DI |
395                           /* Enables digital function */
396                           IOCON_PIO_DIGITAL_EN |
397                           /* Open drain is disabled */
398                           IOCON_PIO_OPENDRAIN_DI |
399                           /* Analog switch is open (disabled) */
400                           IOCON_PIO_ASW_DI);
401     /* PORT1 PIN9 (coords: 3) is configured as PIO1_9 */
402     IOCON_PinMuxSet(IOCON, BOARD_INITBUTTONSPINS_USR_PORT, BOARD_INITBUTTONSPINS_USR_PIN, USR);
403 }
404 
405 /* clang-format off */
406 /*
407  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
408 BOARD_InitACCELPins:
409 - options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
410 - pin_list:
411   - {pin_num: '45', peripheral: FLEXCOMM0, signal: RXD_SDA_MOSI_DATA, pin_signal: PIO0_24/FC0_RXD_SDA_MOSI_DATA/CT_INP8/SCT_GPI0/SECURE_GPIO0_24, mode: pullUp, slew_rate: standard,
412     invert: disabled, open_drain: disabled}
413   - {pin_num: '52', peripheral: FLEXCOMM0, signal: TXD_SCL_MISO_WS, pin_signal: PIO0_25/FC0_TXD_SCL_MISO_WS/CT_INP9/SCT_GPI1/SECURE_GPIO0_25, mode: pullUp, slew_rate: standard,
414     invert: disabled, open_drain: disabled}
415   - {pin_num: '27', peripheral: GPIO, signal: 'PIO1, 23', pin_signal: PIO1_23/FC2_SCK/SCT0_OUT0/FC3_SSEL2/PLU_OUT5, mode: inactive, slew_rate: standard, invert: disabled,
416     open_drain: disabled}
417  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
418  */
419 /* clang-format on */
420 
421 /* FUNCTION ************************************************************************************************************
422  *
423  * Function Name : BOARD_InitACCELPins
424  * Description   : Configures pin routing and optionally pin electrical features.
425  *
426  * END ****************************************************************************************************************/
427 /* Function assigned for the Cortex-M33 */
BOARD_InitACCELPins(void)428 void BOARD_InitACCELPins(void)
429 {
430     /* Enables the clock for the I/O controller.: Enable Clock. */
431     CLOCK_EnableClock(kCLOCK_Iocon);
432 
433     const uint32_t port0_pin24_config = (/* Pin is configured as FC0_RXD_SDA_MOSI_DATA */
434                                          IOCON_PIO_FUNC1 |
435                                          /* Selects pull-up function */
436                                          IOCON_PIO_MODE_PULLUP |
437                                          /* Standard mode, output slew rate control is enabled */
438                                          IOCON_PIO_SLEW_STANDARD |
439                                          /* Input function is not inverted */
440                                          IOCON_PIO_INV_DI |
441                                          /* Enables digital function */
442                                          IOCON_PIO_DIGITAL_EN |
443                                          /* Open drain is disabled */
444                                          IOCON_PIO_OPENDRAIN_DI);
445     /* PORT0 PIN24 (coords: 45) is configured as FC0_RXD_SDA_MOSI_DATA */
446     IOCON_PinMuxSet(IOCON, 0U, 24U, port0_pin24_config);
447 
448     const uint32_t port0_pin25_config = (/* Pin is configured as FC0_TXD_SCL_MISO_WS */
449                                          IOCON_PIO_FUNC1 |
450                                          /* Selects pull-up function */
451                                          IOCON_PIO_MODE_PULLUP |
452                                          /* Standard mode, output slew rate control is enabled */
453                                          IOCON_PIO_SLEW_STANDARD |
454                                          /* Input function is not inverted */
455                                          IOCON_PIO_INV_DI |
456                                          /* Enables digital function */
457                                          IOCON_PIO_DIGITAL_EN |
458                                          /* Open drain is disabled */
459                                          IOCON_PIO_OPENDRAIN_DI);
460     /* PORT0 PIN25 (coords: 52) is configured as FC0_TXD_SCL_MISO_WS */
461     IOCON_PinMuxSet(IOCON, 0U, 25U, port0_pin25_config);
462 
463     const uint32_t ACCL_INTR = (/* Pin is configured as PIO1_23 */
464                                 IOCON_PIO_FUNC0 |
465                                 /* No addition pin function */
466                                 IOCON_PIO_MODE_INACT |
467                                 /* Standard mode, output slew rate control is enabled */
468                                 IOCON_PIO_SLEW_STANDARD |
469                                 /* Input function is not inverted */
470                                 IOCON_PIO_INV_DI |
471                                 /* Enables digital function */
472                                 IOCON_PIO_DIGITAL_EN |
473                                 /* Open drain is disabled */
474                                 IOCON_PIO_OPENDRAIN_DI);
475     /* PORT1 PIN23 (coords: 27) is configured as PIO1_23 */
476     IOCON_PinMuxSet(IOCON, BOARD_INITACCELPINS_ACCL_INTR_PORT, BOARD_INITACCELPINS_ACCL_INTR_PIN, ACCL_INTR);
477 }
478 
479 /* clang-format off */
480 /*
481  * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
482 BOARD_InitCANPins:
483 - options: {callFromInitBoot: 'false', coreID: cm33_core0, enableClock: 'true'}
484 - pin_list:
485   - {pin_num: '41', peripheral: CAN0, signal: CAN_TD, pin_signal: PIO1_2/CAN0_TD/CTIMER0_MAT3/SCT_GPI6/HS_SPI_SCK/PLU_OUT5, mode: inactive, slew_rate: standard, invert: disabled,
486     open_drain: disabled}
487   - {pin_num: '42', peripheral: CAN0, signal: CAN_RD, pin_signal: PIO1_3/CAN0_RD/SCT0_OUT4/HS_SPI_MISO/PLU_OUT6, mode: inactive, slew_rate: standard, invert: disabled,
488     open_drain: disabled}
489  * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
490  */
491 /* clang-format on */
492 
493 /* FUNCTION ************************************************************************************************************
494  *
495  * Function Name : BOARD_InitCANPins
496  * Description   : Configures pin routing and optionally pin electrical features.
497  *
498  * END ****************************************************************************************************************/
499 /* Function assigned for the Cortex-M33 */
BOARD_InitCANPins(void)500 void BOARD_InitCANPins(void)
501 {
502     /* Enables the clock for the I/O controller.: Enable Clock. */
503     CLOCK_EnableClock(kCLOCK_Iocon);
504 
505     const uint32_t port1_pin2_config = (/* Pin is configured as CAN0_TD */
506                                         IOCON_PIO_FUNC1 |
507                                         /* No addition pin function */
508                                         IOCON_PIO_MODE_INACT |
509                                         /* Standard mode, output slew rate control is enabled */
510                                         IOCON_PIO_SLEW_STANDARD |
511                                         /* Input function is not inverted */
512                                         IOCON_PIO_INV_DI |
513                                         /* Enables digital function */
514                                         IOCON_PIO_DIGITAL_EN |
515                                         /* Open drain is disabled */
516                                         IOCON_PIO_OPENDRAIN_DI);
517     /* PORT1 PIN2 (coords: 41) is configured as CAN0_TD */
518     IOCON_PinMuxSet(IOCON, 1U, 2U, port1_pin2_config);
519 
520     const uint32_t port1_pin3_config = (/* Pin is configured as CAN0_RD */
521                                         IOCON_PIO_FUNC1 |
522                                         /* No addition pin function */
523                                         IOCON_PIO_MODE_INACT |
524                                         /* Standard mode, output slew rate control is enabled */
525                                         IOCON_PIO_SLEW_STANDARD |
526                                         /* Input function is not inverted */
527                                         IOCON_PIO_INV_DI |
528                                         /* Enables digital function */
529                                         IOCON_PIO_DIGITAL_EN |
530                                         /* Open drain is disabled */
531                                         IOCON_PIO_OPENDRAIN_DI);
532     /* PORT1 PIN3 (coords: 42) is configured as CAN0_RD */
533     IOCON_PinMuxSet(IOCON, 1U, 3U, port1_pin3_config);
534 }
535 /***********************************************************************************************************************
536  * EOF
537  **********************************************************************************************************************/
538