PN7462 Using GPIO14 as GPIO Output?

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

PN7462 Using GPIO14 as GPIO Output?

跳至解决方案
1,737 次查看
EE_Ark
Contributor II

Hi,

How can I configure GPIO14(CLK_AUX) as GPIO output and set it's value?

I know I should use "ph_Reg.h" file but couldn't find out what should i do exactly.

 

Thanks.

 

0 项奖励
回复
1 解答
1,722 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @EE_Ark :

 

In order to config GPIO output,  you can try API: phhalPcr_ConfigOutput  () and PH_HAL_GPIO_SETGPIOVAL ()

You can refer to pphhalPcr_GpioInit() function in phhalGpio.c

 

Regards

Daniel

 

 

 

 

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,730 次查看
EE_Ark
Contributor II

I tried these codes without success.

 

PH_REG_SET_BITN(PCR_PAD_CLK_AUX_REG,PCR_PAD_CLK_AUX_REG_CLK_AUX_GPIOMODE_EN_POS);

//PH_REG_SET_FIELD( PCR_PAD_CLK_AUX_REG , CLK_AUX_PUPD,0x2);//pull up
//PH_REG_SET_FIELD( PCR_PAD_CLK_AUX_REG , CLK_AUX_PUPD,0x3);//pull down

PH_REG_SET_BIT(PCR_PADOUT_REG,PADOUT_CLK_AUX); //Set CLK_AUX HIGH
PH_REG_CLEAR_BIT(PCR_PADOUT_REG,PADOUT_CLK_AUX); //Set CLK_AUX LOW

0 项奖励
回复
1,723 次查看
danielchen
NXP TechSupport
NXP TechSupport

Hi @EE_Ark :

 

In order to config GPIO output,  you can try API: phhalPcr_ConfigOutput  () and PH_HAL_GPIO_SETGPIOVAL ()

You can refer to pphhalPcr_GpioInit() function in phhalGpio.c

 

Regards

Daniel

 

 

 

 

0 项奖励
回复