I was facing some issues getting PWM peripheral work on my custom nRF52840 board. And then I tried the pwm output on P0.08 instead of P0.06 and the signal came out just fine.
So I tried the following code snippet on a modified ble_app_hrs example on PCA10056 v0.9.0 board.
//Right after advertising_start(erase_bonds); in ble_app_hrs example int i=0; for(i=0;i<48;i++){ nrf_gpio_cfg_output(i); nrf_gpio_pin_clear(i); }
And measured all the GPIO voltages on the PCA10056. Then I replaced the nrf_gpio_pin_clear with nrf_gpio_pin_set() and measured the voltage on all the GPIO pins.
These are my observations:
Following pins are always at 0V, irrespective of pin_set or pin_clear:
P0.00, P0.01, P0.09, P0.10, P0.17, P0.19, P0.20, P0.21, P0.22, P0.23
Following pins are always at 3V, irrespective of pin_set or pin_clear
P0.06, P0.18
Rest of the pins work as expected i.e. 0V for pin_clear and 3V for pin_set
I realise that P0.09 and P0.10 are NFC pins and P18 is reset. Also a brief look at boards.h shows that pins 17, 20-23 are QSPI pins.
So is there something I should do to get back control of these GPIOs? Is there some documentation on this?
Let me know. I am really stuck with this.