/* Enter a CRITICAL section. 
When a CRITICAL section is entered, all interrupts (except fault handlers) are disabled. */
SL_WEAK CORE_irqState_t CORE_EnterCritical(void)
/* Enter a CRITICAL section. 
When a CRITICAL section is entered, all interrupts (except fault handlers) are disabled. */
SL_WEAK CORE_irqState_t CORE_EnterCritical(void)
{
  CORE_irqState_t irqState = __get_PRIMASK();
  __disable_irq();
  return irqState;
}