I’m quite new with rtos and I have a question because I’m facing a sensitive problem
I’ve implemented a task that handle a SD Card. Other task can write read and perform several action on the sd card.
My problem is how to safely transfer the data, since I’m limited in ram, I cannot make a queue that has all the required array.
I’m based on the freertos UDP/IP example http://www.freertos.org/Pend-on-multiple-rtos-objects.html
Passing a pointer to an array is not a problem, although how to safely do it is a big headache. I’ve made a structure with different pointers to the required arrays and also few flags to avoid double access but even in that case, some array may be accessed by two tasks at the same time.
The point is that my SDCard task should not have large array but only access by pointers to arrays given by other tasks.
What would be the best way to do that ?