I am using FreeRTOS 7.3.0 on an Atmel SAM4 chip using the ASF library. I have a task that executes 4 calls in sequence then blocks. Each one is an interrupt driven state machine that issues an event from the ISR at the end. Each call waits for such an event before exiting. Each call invokes some SPI traffic which I can monitor on an external logic analyzer. What I observe is
Set the tick rate to 1ms and I see approx 1ms gaps between the calls.
Set the tick rate to 5ms and I see approx 5ms gaps between the calls.
Set the config_USEPREEMPTIVE to 0
And I see very small gaps between the calls.
Clearly when ‘preemtive’, the RTOS is going off to do something else during these gaps.
In my code all tasks block, either on input Qs or output Q’s or wait for events. The entire design is asynchronous
and event driven.
In my test setup I have no regular activity other than an LED flasher running at 100ms period.
I start the test activity by a keypress.
I had presumed that at the RTOS tick the kernel would go around the other tasks, find they were all blocked
and come back pretty sharpish to continue executing the test task … but it appears not.
Anyone have any ideas ??? …before I get down and dirty and start putting debug code into FreeRTOS itself.
Any help appreciated.