If you use CMSIS drivers, check for:
void __disable_irq(void)
void __enable_irq(void)
They just call CPSIE
and CPSID
instructions.
Generally read about NVIC
in the programming manual. I also recommend a fantastic book on Cortex M0:
The Definitive Guide to the ARM Cortex-M0 by Joseph Yiu.