In my below FreeRTOS code, the global variable command_buffer is protected from altering by using critical API ( taskENTER_CRITICAL() and taskEXIT_CRITICAL() API). Is it possible that any interrupts with a priority, say 4 can still access this global variable?
void command_handling_task(void *params) {
while(1) {
xTaskNotifyWait(0,0,NULL,portMAX_DELAY);
taskENTER_CRITICAL();
new_cmd = parseCMD(command_buffer);
taskEXIT_CRITICAL();
xQueueSendToFront(command_queue_handle, &new_cmd, portMAX_DELAY);
}
}