Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

LeonH
Level 3
Level 3
First solution authored 50 sign-ins First like received

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 .

1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
500 solutions authored 250 sign-ins 1000 replies posted

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);

View solution in original post

3 Replies
Anonymous
Not applicable

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.

Owen_Zhang123
Moderator
Moderator
Moderator
500 solutions authored 250 sign-ins 1000 replies posted

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.

0 Likes