I am using the csi_rgb565 example and I am trying to use rtos to run two tasks. The first task is the camera task, which captures images and displays it on the LCD, and the second task is an image processing task, which processes images slowly and runs less frequently than the camera task. I have set two tasks with the same priority but when I started the scheduler, only the camera task is running. The image processing task never runs. I have set USE_PREEEMPTION and USE_TIME_SLICING to 1 but the problem persists. Can anyone help? Thanks!
FreeRTOS uses priority based scheduler. If a higher priority task never blocks on something, lower priority tasks will not get any time to execute. I would suggest you check your higher priority task. for example, vTaskDelay can release CPU, then lower priority task can have an opportunity to run.
Both my tasks have the same priority so I don't think priority is the problem here. Also, I have added vTaskDelay to one of the tasks but the tasks still didn't switch.