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

coexistence of softdevice + tiny OS for the application

Looking over documentation and the forums, it appears that the softdevice is not meant to be used with an application that uses an RTOS. I say this primarily because disabling of interrupts, which is what an RTOS will do, sounds like it will cause the softdevice to assert. [edit] Actually, on higher Cortex-M (M3/M4) processors, you can take advantage of the BASEPRI register to disable only interrupts that are "kernel-aware". So this is mostly a limitation of the Cortex-M0 [/edit]

What happens if you only call sd_nvic_critical_region_enter/exit when the softdevice is enabled? Conceivably this should allow the OS to run in region 1 (app space) and execute critical sections that way.

What about an app that enables and disables the BLE stack? The only way to get this to work is to change the method of disabling/enabling interrupts based on whether the softdevice is enabled or disabled. Is this workable? It seems like the changing of the method used to enable/disable interrupts would need to occur in a critical section, otherwise the OS could interrupt you midway through and try to execute a critical section before the switch has been completely made, causing problems. Is there a way to use an interrupt to change the method used by critical sections?

Am I on crack for even considering this on this platform (nRF51822)?

Parents Reply Children
No Data
Related