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