Could I config WICED_P04 as GPIO with CYW20706?

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

cross mob
LeonH
Level 4
Level 4
Distributor - Arrow(GC)
100 sign-ins First solution authored 50 sign-ins

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 .

0 Likes
1 Solution
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

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
5 questions asked 500 solutions authored 250 sign-ins

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

LeonH
Level 4
Level 4
Distributor - Arrow(GC)
100 sign-ins First solution authored 50 sign-ins

Hi yssu,

Thanks for your response.

Hi zhxh,

Yes, it works. I can control P4 pin as GPIO.

Thank you.

0 Likes