This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

BLE RADIO ON/OFF in interrupt handler

Hi, Am using NRF52 S132 softdevice, I have a use case like when I press a button , I should turn off BLE. So I enabled an interrupt for button. Whenever this button is pressed in the interrupt handler I called sd_ble_gap_adv_stop(); but it hanged .. Cant we call any softdevice related function in interrupt handler ?

Parents
  • What's the priority of the button interrupt? If it's high then it's higher than the SVC call priority and the ARM Cortex will hardfault. It needs to be low if you want to call sd_* functions from it.

    If it's that - this is discussed at least 5 times a week, a quick search would have answered the question; if it's not, then it didn't "hanged", there's an error or a hardfault, hit the break button and find out where you are and update the question with more information.

  • Hi RK Sorry, I have both NRF51 and NRF52 with me, with NRF52 it was working when I set the priority to lowest priority but not with NRF51 . How can I get it working in NRF51

Reply Children
No Data
Related