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

External Interrupt with softdevice

Hi,

Please help me with the following theoretical situation: I have a NRF52832 running HID profile, mostly sleeping. From time to time, an external interrupt occur (GPIO line) and the time interval in which the MCU must handle this interrupt is 150us, when running the handle code only takes 50us.

Is it possible to configure the softdevice in such way that the MCU will handle the interrupt EVERY time ? i.e. is there a way to define a critical section in the code that overcome the softdevice priority?

Thanks

  • Hi Assafi,

    the SoftDevice will always run with the highest priority and we do not provide any APIs that allows you to alter this since the SoftDevice has real-time constraints that must be meet.

    We provide utility functions to create critical regions, see this page on Infocenter, but these functions will only disable interrupts from other peripherals and not the SoftDevice itself.

    It is possible to use the SoftDevice's TimeSlot API to request a timeslot where you're guaranteed to not receive any interrupts from the SoftDevice. However, ultimately it's the SoftDevice that decides if the timeslot should be granted or not.

    Best regards

    Bjørn

Related