2 * Copyright 2017, NXP
\r
3 * All rights reserved.
\r
6 * SPDX-License-Identifier: BSD-3-Clause
\r
11 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
\r
15 package_id: LPC54018JET180
\r
17 processor_version: 0.0.0
\r
18 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
\r
21 #include "fsl_common.h"
\r
22 #include "fsl_iocon.h"
\r
23 #include "pin_mux.h"
\r
25 /*FUNCTION**********************************************************************
\r
27 * Function Name : BOARD_InitBootPins
\r
28 * Description : Calls initialization functions.
\r
30 *END**************************************************************************/
\r
31 void BOARD_InitBootPins(void) {
\r
35 #define IOCON_PIO_DIGITAL_EN 0x0100u /*!< Enables digital function */
\r
36 #define IOCON_PIO_FUNC1 0x01u /*!< Selects pin function 1 */
\r
37 #define IOCON_PIO_INPFILT_OFF 0x0200u /*!< Input filter disabled */
\r
38 #define IOCON_PIO_INV_DI 0x00u /*!< Input function is not inverted */
\r
39 #define IOCON_PIO_MODE_INACT 0x00u /*!< No addition pin function */
\r
40 #define IOCON_PIO_OPENDRAIN_DI 0x00u /*!< Open drain is disabled */
\r
41 #define IOCON_PIO_SLEW_STANDARD 0x00u /*!< Standard mode, output slew rate control is enabled */
\r
42 #define PIN29_IDX 29u /*!< Pin number for pin 29 in a port 0 */
\r
43 #define PIN30_IDX 30u /*!< Pin number for pin 30 in a port 0 */
\r
44 #define PORT0_IDX 0u /*!< Port index */
\r
47 * TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
\r
49 - options: {callFromInitBoot: 'true', coreID: core0, enableClock: 'true'}
\r
51 - {pin_num: B13, peripheral: FLEXCOMM0, signal: RXD_SDA_MOSI, pin_signal: PIO0_29/FC0_RXD_SDA_MOSI/CTIMER2_MAT3/SCT0_OUT8/TRACEDATA(2), mode: inactive, invert: disabled,
\r
52 glitch_filter: disabled, slew_rate: standard, open_drain: disabled}
\r
53 - {pin_num: A2, peripheral: FLEXCOMM0, signal: TXD_SCL_MISO, pin_signal: PIO0_30/FC0_TXD_SCL_MISO/CTIMER0_MAT0/SCT0_OUT9/TRACEDATA(1), mode: inactive, invert: disabled,
\r
54 glitch_filter: disabled, slew_rate: standard, open_drain: disabled}
\r
55 * BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
\r
58 /*FUNCTION**********************************************************************
\r
60 * Function Name : BOARD_InitPins
\r
62 *END**************************************************************************/
\r
63 void BOARD_InitPins(void) { /* Function assigned for the Core #0 (ARM Cortex-M4) */
\r
64 CLOCK_EnableClock(kCLOCK_Iocon); /* Enables the clock for the IOCON block. 0 = Disable; 1 = Enable.: 0x01u */
\r
66 const uint32_t port0_pin29_config = (
\r
67 IOCON_PIO_FUNC1 | /* Pin is configured as FC0_RXD_SDA_MOSI */
\r
68 IOCON_PIO_MODE_INACT | /* No addition pin function */
\r
69 IOCON_PIO_INV_DI | /* Input function is not inverted */
\r
70 IOCON_PIO_DIGITAL_EN | /* Enables digital function */
\r
71 IOCON_PIO_INPFILT_OFF | /* Input filter disabled */
\r
72 IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */
\r
73 IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */
\r
75 IOCON_PinMuxSet(IOCON, PORT0_IDX, PIN29_IDX, port0_pin29_config); /* PORT0 PIN29 (coords: B13) is configured as FC0_RXD_SDA_MOSI */
\r
76 const uint32_t port0_pin30_config = (
\r
77 IOCON_PIO_FUNC1 | /* Pin is configured as FC0_TXD_SCL_MISO */
\r
78 IOCON_PIO_MODE_INACT | /* No addition pin function */
\r
79 IOCON_PIO_INV_DI | /* Input function is not inverted */
\r
80 IOCON_PIO_DIGITAL_EN | /* Enables digital function */
\r
81 IOCON_PIO_INPFILT_OFF | /* Input filter disabled */
\r
82 IOCON_PIO_SLEW_STANDARD | /* Standard mode, output slew rate control is enabled */
\r
83 IOCON_PIO_OPENDRAIN_DI /* Open drain is disabled */
\r
85 IOCON_PinMuxSet(IOCON, PORT0_IDX, PIN30_IDX, port0_pin30_config); /* PORT0 PIN30 (coords: A2) is configured as FC0_TXD_SCL_MISO */
\r
88 /*******************************************************************************
\r
90 ******************************************************************************/
\r