My NRF52832 runs into the hardfault handler when the sd_ble_gap_conn_param_update() function is called.
I copied the BLE code from the ble_app_template_pca10 project. When I run the code in that project there is no problem, but now the code is copied to my own project the device runs into the hardfault handler.
What are possible reasons for the hardfault to occur in that function?
Which error code does sd_ble_gap_conn_param_update() return?
It does not return an error code, the MCU runs into a hardfault in the sd_ble_gap_conn_param_update() function. It never returns from that function...
Okay, I see. Is there anything in your app that is running on higher interrupt priority than the BLE events, do you have anything in your app that is running on the priority APP_IRQ_PRIORITY_HIGH? If so, could you change it to APP_IRQ_PRIORITY_LOW or APP_IRQ_PRIORITY_LOWEST?
I have nothing in my app running on APP_IRP_PRIORITY_HIGH. All the peripherals are configured at IRQ_PRIORITY 7 in sdk_config.h
Nevermind, I figured out that I accidently set the app_timer IRQ priority to HIGHEST! Now I changed it back to LOW it does not hardfault anymore. Thanks for pointing in the right direction! This case can be labeled as resolved.