MCUXpresso_MIMXRT1052xxxxB/boards/evkbimxrt1050/bootloader_examples/flashloader/pin_mux.c

177 lines
10 KiB
C

/*
* Copyright 2020 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/***********************************************************************************************************************
* This file was generated by the MCUXpresso Config Tools. Any manual edits made to this file
* will be overwritten if the respective MCUXpresso Config Tools is used to update this file.
**********************************************************************************************************************/
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
!!GlobalInfo
product: Pins v7.0
processor: MIMXRT1052xxxxB
package_id: MIMXRT1052DVL6B
mcu_data: ksdk2_0
processor_version: 7.0.1
board: IMXRT1050-EVKB
pin_labels:
- {pin_num: K14, pin_signal: GPIO_AD_B0_12, label: UART1_TXD, identifier: UART1_TXD;TX}
- {pin_num: L14, pin_signal: GPIO_AD_B0_13, label: UART1_RXD, identifier: UART1_RXD;RX_GPIO;RX}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
#include "fsl_common.h"
#include "fsl_iomuxc.h"
#include "fsl_gpio.h"
#include "pin_mux.h"
/* FUNCTION ************************************************************************************************************
*
* Function Name : BOARD_InitBootPins
* Description : Calls initialization functions.
*
* END ****************************************************************************************************************/
void BOARD_InitBootPins(void) {
}
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
UART1_PollForActivity:
- options: {callFromInitBoot: 'false', coreID: core0, enableClock: 'false'}
- pin_list:
- {pin_num: L14, peripheral: GPIO1, signal: 'gpio_io, 13', pin_signal: GPIO_AD_B0_13, identifier: RX_GPIO, direction: INPUT, pull_up_down_config: Pull_Up_100K_Ohm}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
/* FUNCTION ************************************************************************************************************
*
* Function Name : UART1_PollForActivity
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void UART1_PollForActivity(void) {
/* GPIO configuration of RX_GPIO on GPIO_AD_B0_13 (pin L14) */
gpio_pin_config_t RX_GPIO_config = {
.direction = kGPIO_DigitalInput,
.outputLogic = 0U,
.interruptMode = kGPIO_NoIntmode
};
/* Initialize GPIO functionality on GPIO_AD_B0_13 (pin L14) */
GPIO_PinInit(GPIO1, 13U, &RX_GPIO_config);
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B0_13_GPIO1_IO13, /* GPIO_AD_B0_13 is configured as GPIO1_IO13 */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B0_13_GPIO1_IO13, /* GPIO_AD_B0_13 PAD functional properties : */
0x90B0U); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Up
Hyst. Enable Field: Hysteresis Disabled */
}
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
UART1_InitPins:
- options: {callFromInitBoot: 'false', prefix: UART1_, coreID: core0, enableClock: 'false'}
- pin_list:
- {pin_num: L14, peripheral: LPUART1, signal: RX, pin_signal: GPIO_AD_B0_13, identifier: RX, pull_up_down_config: Pull_Up_47K_Ohm, pull_keeper_select: Pull}
- {pin_num: K14, peripheral: LPUART1, signal: TX, pin_signal: GPIO_AD_B0_12, identifier: TX, pull_up_down_config: Pull_Up_47K_Ohm, pull_keeper_select: Pull}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
/* FUNCTION ************************************************************************************************************
*
* Function Name : UART1_InitPins
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void UART1_InitPins(void) {
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, /* GPIO_AD_B0_12 is configured as LPUART1_TX */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B0_13_LPUART1_RXD, /* GPIO_AD_B0_13 is configured as LPUART1_RX */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, /* GPIO_AD_B0_12 PAD functional properties : */
0x70B0U); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Pull
Pull Up / Down Config. Field: 47K Ohm Pull Up
Hyst. Enable Field: Hysteresis Disabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B0_13_GPIO1_IO13, /* GPIO_AD_B0_13 PAD functional properties : */
0x70B0U); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Pull
Pull Up / Down Config. Field: 47K Ohm Pull Up
Hyst. Enable Field: Hysteresis Disabled */
}
/*
* TEXT BELOW IS USED AS SETTING FOR TOOLS *************************************
UART1_RestoreDefault:
- options: {callFromInitBoot: 'false', coreID: core0, enableClock: 'false'}
- pin_list:
- {pin_num: L14, peripheral: GPIO1, signal: 'gpio_io, 13', pin_signal: GPIO_AD_B0_13, identifier: RX, pull_up_down_config: Pull_Down_100K_Ohm, pull_keeper_select: Keeper}
- {pin_num: K14, peripheral: GPIO1, signal: 'gpio_io, 12', pin_signal: GPIO_AD_B0_12, identifier: TX, pull_up_down_config: Pull_Down_100K_Ohm, pull_keeper_select: Keeper}
* BE CAREFUL MODIFYING THIS COMMENT - IT IS YAML SETTINGS FOR TOOLS ***********
*/
/* FUNCTION ************************************************************************************************************
*
* Function Name : UART1_RestoreDefault
* Description : Configures pin routing and optionally pin electrical features.
*
* END ****************************************************************************************************************/
void UART1_RestoreDefault(void) {
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B0_12_GPIO1_IO12, /* GPIO_AD_B0_12 is configured as GPIO1_IO12 */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinMux(
IOMUXC_GPIO_AD_B0_13_GPIO1_IO13, /* GPIO_AD_B0_13 is configured as GPIO1_IO13 */
0U); /* Software Input On Field: Input Path is determined by functionality */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B0_12_LPUART1_TXD, /* GPIO_AD_B0_12 PAD functional properties : */
0x10B0U); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Down
Hyst. Enable Field: Hysteresis Disabled */
IOMUXC_SetPinConfig(
IOMUXC_GPIO_AD_B0_13_GPIO1_IO13, /* GPIO_AD_B0_13 PAD functional properties : */
0x10B0U); /* Slew Rate Field: Slow Slew Rate
Drive Strength Field: R0/6
Speed Field: medium(100MHz)
Open Drain Enable Field: Open Drain Disabled
Pull / Keep Enable Field: Pull/Keeper Enabled
Pull / Keep Select Field: Keeper
Pull Up / Down Config. Field: 100K Ohm Pull Down
Hyst. Enable Field: Hysteresis Disabled */
}
/***********************************************************************************************************************
* EOF
**********************************************************************************************************************/