also I want to config p32 as gpio(input active high)
You should be able to configure P27 / P33 / P32 by wiced_hal_gpio_configure_pin API .
Are you using CYW20706 EVAL board or custom board? If EVAL board, P33 pin is configured as PUART Rx . Could you please comment of PUART code and try ? Please try switch off PUART Rx on SW5 of eval board.
Could you please check the voltage on VDD pin as well ?
As mentioned in CYW20706 datasheet- section 1.7 GPIO ports, P26, P27, P28, and P29 are capable of driving up to 16 mA at 3.3V or 8 mA at 1.8V. Therefore you are getting voltage value about 1.6V on the pin.
I am using custom board. and I use PUART port P2 and P30.
Voltage on VDD is 3.3V
I just tested on 20706 EVAL board.
wiced_hal_gpio_configure_pin( WICED_P27, GPIO_INPUT_ENABLE| GPIO_EN_INT_BOTH_EDGE , WICED_GPIO_BUTTON_DEFAULT_STATE ); gives me 3.3V on P27 .
1.6V is because of GPIO_PULL_DOWN parameter.
By default GPIO_INPUT_ENABLE will make the pin active high. By adding GPIO_PULL_DOWN its going to tristate and giving ~1.6V