In datasheet (Note: Pin reset is not available on all pins)
I want to know which Pin is available?
In datasheet (Note: Pin reset is not available on all pins)
I want to know which Pin is available?
it's in the pin assignments (and you can work it out from the fact only one value is given for the register value too). P0.21, that's it.
Thank you!
In fact i want to use 26 as a reset and CONFIG_GPIO_AS_PINRESET also defined in MDK。
I can read PSELRESET[0] and PSELRESET[1] registers value both are 0x1a.
But it do not work when press a key that connect pin 26.The other end of the key is connected to GND.(NO external Pull up)
Can it be achieved?
#if defined (CONFIG_GPIO_AS_PINRESET)
if (((NRF_UICR->PSELRESET[0] & UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos)) ||
((NRF_UICR->PSELRESET[1] & UICR_PSELRESET_CONNECT_Msk) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos))){
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
NRF_UICR->PSELRESET[0] = 26;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
NRF_UICR->PSELRESET[1] = 26;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos;
while (NRF_NVMC->READY == NVMC_READY_READY_Busy){}
NVIC_SystemReset();
}
#endif
no - I just told you - it's P0.21, that's it, the only one you can use, there is no other pin available.