Hi, My question is how to config p21 as a gpio?
Hi, My question is how to config p21 as a gpio?
That's not a very clear question is it
you configure P0.21 as a gpio just like you configure any other pin as a gpio.
That's not a very clear question is it
you configure P0.21 as a gpio just like you configure any other pin as a gpio.
it is 52, I configured p21 as spi clk but it is not work, it is ok when I change to another io.
have you defined P0.21 as the reset pin with CONFIG_GPIO_AS_PINRESET
I have removed this define
Then P0.21 should work just like any other GPIO. Make sure you've cleared the UICR entirely as if you've ever run with that define set, the pin has been configured as reset and that configuration is sticky (it is't in non-volatile memory)
I just test with sdk example: nRF5_SDK_11.0.0_89a8197\examples\peripheral\spi\pca10040, just modified the spi io config