AnsweredAssumed Answered

Critical sections enter and exit

Question asked by Kai Liu on Nov 22, 2013
Latest reply on Nov 22, 2013 by Bob Paddock

I am porting some drivers to KL25Z, which has ring buffer management. The original code has CRITICAL_SECTION_ENTER and CRITICAL_SECTION_EXIT macros, which  basically disable interrupt and enable interrupt.


But should we keep some critical register(s) before entering critical sections, and restore after exiting? And which registers should be saved? And any reference code? because I am not good at assembly.


Allan K Liu