FreeRTOS API functions must not be called from within a critical section. Source: https://www.freertos.org/Documentation/02-Kernel/04-API-references/04-RTOS-kernel-control/01-taskENTER_CRITICAL_taskEXIT_CRITICAL See also my README here, with a potential list of which calls ...