I am currently working on design of the embedded system running FreeRTOS. At this moment I have 3 separate processes, and each of that processes controls it's dedicated hardware. And all these hardware works with the RF field, consequently those 3 processes should be synchronized properly, because they share the same resource (RF field). I suppose these processes should run sequentially in a cycle, like in the following picture:
Another thing I can't figure out is how to deal with interprocess communication. In my particular case there are few scenarios like: "Process A found unknown object in RF field and he wants to give more time to process B, because he may know how to interact with that object".
Now these processes know nothing about each other and thus have no synchronization, and device works awful. I would appreciate any advice in terms of the software design how to synchronize those processes, what kind of synchronization object to prefer and how to keep my code as close to SOLID principles, as possible. Any advice regarding how to do this with FreeRTOS will be great to.
Asked
Active
Viewed 62 times
0

Vadimchik
- 31
- 1
- 8
-
I don't know Free RTOS, but if you always want those operations to happen in the same sequence, and you never want them to overlap, then what is the purpose of doing them in three different processes? Why not have just one process that always does the operations in the correct sequence? – Solomon Slow Feb 12 '18 at 11:33
-
Because each process is responsible for handling low-level events from it's dedicated hardware. Actually it is more because those modules were developed and tested separately and now the main idea is to merge all that functionality into one device. Merging three processes into single process may be solution. – Vadimchik Feb 12 '18 at 12:08