This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Hardlock issue

Chip: NRF51822 softstack version: 5.2.1 I ran into an issue and i'm trying to understand it better. I was calling the function sd_ble_gatts_value_set(...) from a GPIOTE callback and the processor harlocked. Called from outside of the GPIOTE callback the everything works just fine.

What happened?

Parents
  • Due to the way the softdevice works, you can't call softdevice API functions from interrupts with higer priority than the SVC handler (i.e. not from NRF_APP_PRIORITY_HIGH). You should therefore either lower the IRQ priority to NRF_APP_PRIORITY_LOW, or just do what you now do and always call this function from main context.

    This is explained in the appendix of the nRF51 Reference Manual.

Reply
  • Due to the way the softdevice works, you can't call softdevice API functions from interrupts with higer priority than the SVC handler (i.e. not from NRF_APP_PRIORITY_HIGH). You should therefore either lower the IRQ priority to NRF_APP_PRIORITY_LOW, or just do what you now do and always call this function from main context.

    This is explained in the appendix of the nRF51 Reference Manual.

Children
No Data