Before getting into the problem I would like to give summary of our project:
For our system we’re using a 32bit ARM microcontroller running at clock speed of 48MhZ and need to fetch data through different tasks at different hard real timestamps, like:
T1 to fetch data at 10ms
T2,T3 to fetch data at 30ms
T4,T5,T6 to fetch data at 200ms.
We’ve used round-robin and priority based scheduling for these tasks and the result which we see is not as expected.
If all tasks run at different priority based on frequency at which they need to fetch data , then we’re missing packets for 3-4 timestamps after every 5-7 packets
If all tasks are given same priority e.g tskIDLE_PRIORITY+1, then we do miss packets but also the timestamp is not accurate, like for T1, we sometime get data at 11ms sometime at 9ms.
If we run only one task and get the data then it is always accurate but as we start enabling these tasks one after other then data accuracy is lost. We’re kind of OK if we enable 2 tasks to get data. But if we’ve more than 2 tasks then we’ve never received proper data.
Is there something which we need to take care of for configuring FreeRTOS. Or is there a limitation from FreeRTOS to provide hard real time synchronization for 6 tasks running simulatneously and looking for data at above mentioned frequency?
Thanks in advance,