I put my code before ble_stack_init()
reset_reason = NRF_POWER->RESETREAS;
NRF_LOG_PRINTF("reset_reason: 0x%08x.\n",reset_reason );
//NRF_POWER->RESETREAS = 0xffffffff;
and it works
but when I tried nrfjprog, it did not work.
nrfjprog --memrd 0x40000400 --n 4
I mean first method, I get 0x00000002 (=watchdog reset) second method, I get 0x00000000
Why this happend?