1.description of my system:
Hardware:nrf51822,pca10001
Software:sdk5.20,run the softdevice s120
2.the problem i meet,in the main() function
the first i called the function ble_stack_init().it will enable the softdevice .
the second i have a configuration about GPIOTE
NRF_GPIOTE->CONFIG[0] = (GPIOTE_CONFIG_POLARITY_HiToLo << GPIOTE_CONFIG_POLARITY_Pos)
| (16 << GPIOTE_CONFIG_PSEL_Pos)
| (GPIOTE_CONFIG_MODE_Event << GPIOTE_CONFIG_MODE_Pos);
the last i call the function sd_nvic_SetPriority(GPIOTE_IRQn, NRF_APP_PRIORITY_LOW);sd_nvic_EnableIRQ(GPIOTE_IRQn);
To finish these,i think if i push a button ,it will into a ISR(void GPIOTE_IRQHandler(void)) but in the end ,i found the program into a HardFault_Handler.