Hi support team,
I would like to know if the following behavior is a normal behavior:
My config: NRF51422 AAE0 + S310 V2.0
When I enable some inetrrupt like UART for example, soon I enable the softdevice by calling sd_softdevice_enable() function, the interrupt previously activated are disabled.
I've looked the Interrupt Enable control register @0xE000E100 before and after the sd_softdevice_enable() function.
Is it the normal behavior?
Make sure you use sd_* calls when you set the interrupt priorities with the softdevice enabled, like done in e.g. this example where the ADC interrupt priority is set in line 825.
HI Stephan, I'm nearly sure that I'm doing things correctly. I've sent to Vidar my code in may (he was interrested to see the port) but I've no news from him. Have you got a chance to look at the code and let me know what's wrong?
Hi I've found the problem. The issue happen on the chibios rtos port that I'm working on. Briefly, the problem comes from the task switch context. Chibios is configured to use the PendSV interrupt.
During the switch context, in the normal port, PendSV bit is set and then interrupt are enable. PendSV Interrupt occurs immedialtly.
With softdevice, interrupt are never disable. Instead, a specific functions are called (sd_nvic_critical_region_exit/enter, with counter to avoid reentrance).
soon PendSV bit is set, interrupt occur, and then never sd_nvic_critical_region_exit is called. that' why some interrupts are disable