I “thought” I understood how the scheduler worked but I need some help.
I am running freertos on a pic32, using a starter kit and MPLAB.
I started with an example that creates two tasks that use semaphores to pass strings to a routine that “takes” the semaphore uses the printf command to print the string to the output. Works fine.
Now. I created a third task with a higher priority than the other two “printing” tasks. All it does is block for 1/2 second then unblock and toggles an led.
If I comment out the printf statement the led blinks once per second as expected. If I keep the printf statement in, the led blinks erratically. It appears that the printf statement doesn’t yield. There is no vTaskSuspendAll turning off the scheduler.
I would have expected it to yield to the blinker. Obviously I don’t understand something. Can anyone help explain this to me?