Other Parts Discussed in Thread: AM3351, SYSBIOS
Hi, Everyone
I have a question about AM335x Pinmux Utility.
Pinmux Utility outputs am335x_gpevm_pinmux_data.c and am335x_pinmux.h.
/**
* Note: This file was auto-generated by TI PinMux on 2016年5月10日 at 10:20:03.
*
* \file am3351_gpevm_pinmux_data.c
*
* \brief This file contains the pin mux configurations for the boards.
* These are prepared based on how the peripherals are extended on
* the boards.
*
* \copyright Copyright (CU) 2016 Texas Instruments Incorporated -
* http://www.ti.com/
*/
/**
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the
* distribution.
*
* Neither the name of Texas Instruments Incorporated nor the names of
* its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
/* ========================================================================== */
/* Include Files */
/* ========================================================================== */
#include "types.h"
#include "pinmux.h"
#include "am3351_pinmux.h"
/** Peripheral Pin Configurations */
#ifndef BUILDCFG_MOD_ADC
#define BUILDCFG_MOD_ADC
#endif /* BUILDCFG_MOD_ADC */
#ifndef BUILDCFG_MOD_PWMSS
#define BUILDCFG_MOD_PWMSS
#endif /* BUILDCFG_MOD_PWMSS */
#ifndef BUILDCFG_MOD_LCDC
#define BUILDCFG_MOD_LCDC
#endif /* BUILDCFG_MOD_LCDC */
#ifndef BUILDCFG_MOD_I2C
#define BUILDCFG_MOD_I2C
#endif /* BUILDCFG_MOD_I2C */
#ifndef BUILDCFG_MOD_USB
#define BUILDCFG_MOD_USB
#endif /* BUILDCFG_MOD_USB */
#ifndef BUILDCFG_MOD_MCSPI
#define BUILDCFG_MOD_MCSPI
#endif /* BUILDCFG_MOD_MCSPI */
#ifndef BUILDCFG_MOD_TIMER
#define BUILDCFG_MOD_TIMER
#endif /* BUILDCFG_MOD_TIMER */
#ifndef BUILDCFG_MOD_UART
#define BUILDCFG_MOD_UART
#endif /* BUILDCFG_MOD_UART */
#if defined(BUILDCFG_MOD_ADC)
static pinmuxPerCfg_t gAdc0PinCfg[] =
{
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gAdcPinCfg[] =
{
{0, TRUE, gAdc0PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_ADC) */
#if defined(BUILDCFG_MOD_PWMSS)
static pinmuxPerCfg_t gPwmss1PinCfg[] =
{
{
/* MyeCAP1 -> eCAP1_in_PWM1_out -> F17 */
PIN_UART0_TXD, (uint16_t)PINMUX_SS_PWMSS_ECAP1, \
( \
PIN_MODE(4) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gPwmssPinCfg[] =
{
{1, TRUE, gPwmss1PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_PWMSS) */
#if defined(BUILDCFG_MOD_LCDC)
static pinmuxPerCfg_t gLcdc0PinCfg[] =
{
{
/* MyLCDC1 -> lcd_vsync -> U7 */
PIN_LCD_VSYNC, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_hsync -> T7 */
PIN_LCD_HSYNC, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_pclk -> W5 */
PIN_LCD_PCLK, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_ac_bias_en -> W7 */
PIN_LCD_AC_BIAS_EN, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_memory_clk -> V16 */
PIN_GPMC_CLK, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data0 -> U1 */
PIN_LCD_DATA0, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data1 -> U2 */
PIN_LCD_DATA1, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data2 -> V1 */
PIN_LCD_DATA2, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data3 -> V2 */
PIN_LCD_DATA3, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data4 -> W2 */
PIN_LCD_DATA4, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data5 -> W3 */
PIN_LCD_DATA5, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data6 -> V3 */
PIN_LCD_DATA6, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data7 -> U3 */
PIN_LCD_DATA7, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data8 -> V4 */
PIN_LCD_DATA8, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data9 -> W4 */
PIN_LCD_DATA9, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data10 -> U5 */
PIN_LCD_DATA10, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data11 -> V5 */
PIN_LCD_DATA11, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data12 -> V6 */
PIN_LCD_DATA12, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data13 -> U6 */
PIN_LCD_DATA13, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data14 -> W6 */
PIN_LCD_DATA14, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data15 -> V7 */
PIN_LCD_DATA15, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data16 -> V17 */
PIN_GPMC_AD15, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data17 -> W17 */
PIN_GPMC_AD14, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data18 -> T13 */
PIN_GPMC_AD13, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data19 -> U13 */
PIN_GPMC_AD12, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data20 -> U12 */
PIN_GPMC_AD11, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data21 -> T12 */
PIN_GPMC_AD10, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data22 -> W16 */
PIN_GPMC_AD9, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyLCDC1 -> lcd_data23 -> V15 */
PIN_GPMC_AD8, 0, \
( \
PIN_MODE(1) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gLcdcPinCfg[] =
{
{0, TRUE, gLcdc0PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_LCDC) */
#if defined(BUILDCFG_MOD_I2C)
static pinmuxPerCfg_t gI2c1PinCfg[] =
{
{
/* MyI2C1 -> I2C1_SCL -> K19 */
PIN_GMII1_RXER, 0, \
( \
PIN_MODE(3) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* MyI2C1 -> I2C1_SDA -> J18 */
PIN_GMII1_CRS, 0, \
( \
PIN_MODE(3) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gI2cPinCfg[] =
{
{1, TRUE, gI2c1PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_I2C) */
#if defined(BUILDCFG_MOD_USB)
static pinmuxPerCfg_t gUsb0PinCfg[] =
{
{
/* MyUSB1 -> USB0_DRVVBUS -> G16 */
PIN_USB0_DRVVBUS, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gUsbPinCfg[] =
{
{0, TRUE, gUsb0PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_USB) */
#if defined(BUILDCFG_MOD_MCSPI)
static pinmuxPerCfg_t gMcspi0PinCfg[] =
{
{
/* MySPI1 -> spi0_sclk -> A18 */
PIN_SPI0_SCLK, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MySPI1 -> spi0_d0 -> B18 */
PIN_SPI0_D0, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MySPI1 -> spi0_d1 -> B17 */
PIN_SPI0_D1, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MySPI1 -> spi0_cs0 -> A17 */
PIN_SPI0_CS0, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MySPI1 -> spi0_cs1 -> B16 */
PIN_SPI0_CS1, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gMcspiPinCfg[] =
{
{0, TRUE, gMcspi0PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_MCSPI) */
#if defined(BUILDCFG_MOD_TIMER)
static pinmuxPerCfg_t gTimer7PinCfg[] =
{
{
/* MyTIMER1 -> timer7 -> F19 */
PIN_UART0_CTSN, 0, \
( \
PIN_MODE(5) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gTimerPinCfg[] =
{
{7, TRUE, gTimer7PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_TIMER) */
#if defined(BUILDCFG_MOD_UART)
static pinmuxPerCfg_t gUart1PinCfg[] =
{
{
/* MyUART1 -> uart1_rxd -> D18 */
PIN_UART1_RXD, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* MyUART1 -> uart1_txd -> C19 */
PIN_UART1_TXD, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyUART1 -> uart1_ctsn -> E17 */
PIN_UART1_CTSN, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* MyUART1 -> uart1_rtsn -> D19 */
PIN_UART1_RTSN, 0, \
( \
PIN_MODE(0) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyUART1 -> uart1_dcdn -> N19 */
PIN_GMII1_TXCLK, 0, \
( \
PIN_MODE(5) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* MyUART1 -> uart1_dsrn -> M19 */
PIN_GMII1_RXCLK, 0, \
( \
PIN_MODE(5) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{
/* MyUART1 -> uart1_dtrn -> N17 */
PIN_GMII1_RXD3, 0, \
( \
PIN_MODE(5) | \
((PIN_PULL_UD_EN) & (~PIN_PULL_TYPE_SEL & ~PIN_RX_ACTIVE)) \
) \
},
{
/* MyUART1 -> uart1_rin -> N16 */
PIN_GMII1_RXD2, 0, \
( \
PIN_MODE(5) | \
((PIN_PULL_UD_EN | PIN_RX_ACTIVE) & (~PIN_PULL_TYPE_SEL)) \
) \
},
{PINMUX_INVALID_PIN}
};
static pinmuxModuleCfg_t gUartPinCfg[] =
{
{1, TRUE, gUart1PinCfg},
{CHIPDB_INVALID_INSTANCE_NUM}
};
#endif /* if defined(BUILDCFG_MOD_UART) */
/** EVM pin configurations for EVM */
pinmuxBoardCfg_t gGpevmPinmuxData[] =
{
#if defined(BUILDCFG_MOD_ADC)
{CHIPDB_MOD_ID_ADC, gAdcPinCfg},
#endif /* if defined(BUILDCFG_MOD_ADC) */
#if defined(BUILDCFG_MOD_PWMSS)
{CHIPDB_MOD_ID_PWMSS, gPwmssPinCfg},
#endif /* if defined(BUILDCFG_MOD_PWMSS) */
#if defined(BUILDCFG_MOD_LCDC)
{CHIPDB_MOD_ID_LCDC, gLcdcPinCfg},
#endif /* if defined(BUILDCFG_MOD_LCDC) */
#if defined(BUILDCFG_MOD_I2C)
{CHIPDB_MOD_ID_I2C, gI2cPinCfg},
#endif /* if defined(BUILDCFG_MOD_I2C) */
#if defined(BUILDCFG_MOD_USB)
{CHIPDB_MOD_ID_USB, gUsbPinCfg},
#endif /* if defined(BUILDCFG_MOD_USB) */
#if defined(BUILDCFG_MOD_MCSPI)
{CHIPDB_MOD_ID_MCSPI, gMcspiPinCfg},
#endif /* if defined(BUILDCFG_MOD_MCSPI) */
#if defined(BUILDCFG_MOD_TIMER)
{CHIPDB_MOD_ID_TIMER, gTimerPinCfg},
#endif /* if defined(BUILDCFG_MOD_TIMER) */
#if defined(BUILDCFG_MOD_UART)
{CHIPDB_MOD_ID_UART, gUartPinCfg},
#endif /* if defined(BUILDCFG_MOD_UART) */
{CHIPDB_MOD_ID_INVALID}
};
I make project on CCS.
but We need to include two header file.
#include "types.h"
#include "pinmux.h"
We add these two header file from ISDK.
C:\ti\sysbios_ind_sdk_2.1.0.1\sdk\starterware
but I do not know how to use after this?
Actually This c source does not have function for configuration.
Best Regards
Hiroyasu