File tree 1 file changed +15
-0
lines changed
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,21 @@ void init( void )
44
44
NRF_RTC1 -> INTENSET = RTC_INTENSET_OVRFLW_Msk ;
45
45
NRF_RTC1 -> EVTENSET = RTC_EVTEN_OVRFLW_Msk ;
46
46
NRF_RTC1 -> TASKS_START = 1 ;
47
+
48
+ #if defined(RESET_PIN )
49
+ if (((NRF_UICR -> PSELRESET [0 ] & UICR_PSELRESET_CONNECT_Msk ) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos )) ||
50
+ ((NRF_UICR -> PSELRESET [1 ] & UICR_PSELRESET_CONNECT_Msk ) != (UICR_PSELRESET_CONNECT_Connected << UICR_PSELRESET_CONNECT_Pos ))){
51
+ NRF_NVMC -> CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos ;
52
+ while (NRF_NVMC -> READY == NVMC_READY_READY_Busy ){}
53
+ NRF_UICR -> PSELRESET [0 ] = RESET_PIN ;
54
+ while (NRF_NVMC -> READY == NVMC_READY_READY_Busy ){}
55
+ NRF_UICR -> PSELRESET [1 ] = RESET_PIN ;
56
+ while (NRF_NVMC -> READY == NVMC_READY_READY_Busy ){}
57
+ NRF_NVMC -> CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos ;
58
+ while (NRF_NVMC -> READY == NVMC_READY_READY_Busy ){}
59
+ NVIC_SystemReset ();
60
+ }
61
+ #endif
47
62
}
48
63
49
64
#ifdef __cplusplus
You can’t perform that action at this time.
0 commit comments