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

sd_nvic_region_enter/exit

In regard to the following functions

uint32_t sd_nvic_critical_region_enter ( uint8_t * p_is_nested_critical_region ) uint32_t sd_nvic_critical_region_exit ( uint8_t is_nested_critical_region )

It appears that these functions keep track of nested critcal regions for us. How are they to be used. I have just been passing in a local variable (is_nested). Do the functions themselves manage the value of the variable for me. Should they be made global? Or is local fine?

Also will these functions disable all user mode interrupts? Software-timers, hw timers, serial communication, ect... I assume they leave the critical soft device interrupts enabled?

Thank you for the support.

Related