大侠们好,初入am335x,问个小白问题。
开发板是买的飞凌的,想裸跑,startware中Uart的例程里,有个UARTPinMuxSetup,这个函数应该是用于管脚的配置吧?可是里面有个函数
profile = EVMProfileGet();
我看了下EVMProfileGet,是一个IIC对CPLD的读取,这个是啥意思,貌似我的开发板上没有cpld~...小白问题,百度良久未见效,且听解答,不胜感激。
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
大侠们好,初入am335x,问个小白问题。
开发板是买的飞凌的,想裸跑,startware中Uart的例程里,有个UARTPinMuxSetup,这个函数应该是用于管脚的配置吧?可是里面有个函数
profile = EVMProfileGet();
我看了下EVMProfileGet,是一个IIC对CPLD的读取,这个是啥意思,貌似我的开发板上没有cpld~...小白问题,百度良久未见效,且听解答,不胜感激。
是不是只有EVM板上才需要读取profile,那我在自己的板子上,可以屏蔽掉这句话吗?
例如GPIO例程,我屏蔽 //GPIO0Pin7PinMuxSetup();后,可以正常运行,但是将
#define GPIO_INSTANCE_PIN_NUMBER (7u)改为
#define GPIO_INSTANCE_PIN_NUMBER (31u)
后,31脚并没有我想要的拉高拉低的处理。
//#define GPIO_INSTANCE_PIN_NUMBER (7u)
#define GPIO_INSTANCE_PIN_NUMBER (31u)
/*****************************************************************************
** INTERNAL FUNCTION PROTOTYPES
*****************************************************************************/
static void Delay(volatile unsigned int count);
/*****************************************************************************
** FUNCTION DEFINITIONS
*****************************************************************************/
int main(void)
{
/* unsigned int count = 0; */
//MUX_EVM();
/* Configuring the functional clock for GPIO0 instance. */
GPIO0ModuleClkConfig();
/* Doing a pin multiplexing and selecting GPIO0[7] for use. */
//GPIO0Pin7PinMuxSetup();
/* Enabling the GPIO module. */
GPIOModuleEnable(SOC_GPIO_0_REGS);
/* Resetting the GPIO module. */
GPIOModuleReset(SOC_GPIO_0_REGS);
/* Configuring GPIO0[7] pin as an output pin. */
GPIODirModeSet(SOC_GPIO_0_REGS,
GPIO_INSTANCE_PIN_NUMBER,
GPIO_DIR_OUTPUT);
while(1)
{
/* Driving GPIO0[7] pin to logic HIGH. */
GPIOPinWrite(SOC_GPIO_0_REGS,
GPIO_INSTANCE_PIN_NUMBER,
GPIO_PIN_HIGH);
Delay(0xFFFFF);
/* Driving GPIO0[7] pin to logic LOW. */
GPIOPinWrite(SOC_GPIO_0_REGS,
GPIO_INSTANCE_PIN_NUMBER,
GPIO_PIN_LOW);
Delay(0xFFFFF);
}
}这个profile是GPEVM从CPLD中读取的,只有GPEVM板上面有,他从某种程度上决定了pinmux。但是对于实际的客户制作板子而言,并不需要,把这部分的内容去掉,同时注意处理对应的逻辑,来确保你的Pinmux配置正确即可。