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.
Solved! Go to Solution.
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
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
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