I try to run snip.hal.gpio example in WICED Studio 6.1.
When I config WICED_P04 as GPIO and output low, but it always keep high, the voltage only drop to 2.9V.
Could WICED_P04@ pin config as GPIO?
or it has been locked internally as another function .
Solved! Go to Solution.
Hi,
Please add the following code to the init part of your project to disconnect the internal connection of P24 .
#define cr_pad_fcn_ctl_adr4 0x003201b8
#define REG32(x) (*(volatile unsigned*)(x))
unsigned val = REG32(cr_pad_fcn_ctl_adr4) & ~(0x0000F000);
REG32(cr_pad_fcn_ctl_adr4) = val | (7 << 12);
Yes, there is an issue with using P4 or P24 as a GPIO. P4/P24/BT_CLK_REQ are pin muxed on the same pad and the BT_CLK_REQ is enabled by default which is why you will not be able to use either P4 or P24.
We will try to fix this issue as soon as possible.
Hi,
Please add the following code to the init part of your project to disconnect the internal connection of P24 .
#define cr_pad_fcn_ctl_adr4 0x003201b8
#define REG32(x) (*(volatile unsigned*)(x))
unsigned val = REG32(cr_pad_fcn_ctl_adr4) & ~(0x0000F000);
REG32(cr_pad_fcn_ctl_adr4) = val | (7 << 12);
Hi yssu,
Thanks for your response.
Hi zhxh,
Yes, it works. I can control P4 pin as GPIO.
Thank you.