 Hello, in this small part we will work further on the previous exercise, so queues to senders. And in this case, we would increase the priority of our receiver task. So I'm back in cube IDE, open free R2S configuration part, and open tasks and queues. I'm increasing by double click, and I would increase the priority of receiver task. So at the moment it is normal, and I would use above normal, which is much higher than both senders. After this, I will not do any further modifications here. I will generate the code once again. I would keep everything like before, so let's build the code once again. Just to remind you, please have a look. Our senders are sending some sign of life, then either one or two to the cube, and then they are sent to block state for two seconds. Receiver is sending some sign of life, so R, then it is trying to get some data from the cube, waiting four seconds for this maximum. Then in case of success, this task is sending the data. If not, it is not sending anything else. And after this, it is sent to the block state for two seconds. In this particular time, receiver will have much higher priority than senders, so it will try to take more data from the cube. It will be allowed to do this. Okay, so let's try and start the debug session. So I click the debug icon. And again, I would use SWV ITM data console. It is configured, yes, for pin zero. I click start with this ballot, and then I press resume. And what is happening here? Let's stop it for a while and let's analyze what we can see. At the beginning, there is receiver selected, just and it is not displaying nothing because the cube is empty, so it is stacking on it for four seconds. But even if it will not stack, it will step over. Let me go to the code. Even if you put a smaller timeout, it will exit and stop on this OS delay, and it will be in a block state again for two seconds. Receiver, after sending this task action, it is in blocked state, so first sender is selected. It is sending some data to the queue. It is sending data to the queue and once it is sent, it is unblocking the receiver within this function already, because this function has been run for maximum four seconds. So maximum four seconds, receiver is waiting for the data in the queue. If the data in the queue will receive within those four seconds, receiver task would be unblocked by the scheduler and selected for execution as it is the highest priority task, as you remember. So task one would be preempted by receiver task. Receiver will collect this one send by sender one, and it will display it. After this, it will be sent for two seconds to the blocked state again. So this would be the time for sender two. So sender two will perform its action, as sender two is sent as well to blocked state for two seconds. Receiver would be selected as its delay will elapse, so it will execute this r sign of life, and it will stack again for this. It could stack again, but it will not, because sender two has sent two into the queue. So we can see this effect receiver and then immediately sending this content from the queue, so number two. After this sender two would be selected again. It will send the data into the queue, and then just after it, it will be sender one. In the meantime, receiver is in this, let's say, blocked state caused by this delay. This is why both senders have a chance to execute its code. After this, receiver is woken up, it's back from the blocked state caused by this function, and it is sending its sign of life, so big r. And after this, the receiver is sending two into this, and it is again sent for two seconds to the blocked state. So this is again a chance for sender two, and the story continues. So as you can see, sometimes it is quite difficult to plan the full determinism within the system when you've got more, let's say, than one sender and one receiver. So please carefully plan your timing, especially using OS delays and the timeouts within OS message queue get and queue put, just to be sure that you will receive the proper messages from the queue as expected. So that's all for this exercise. Thank you for watching the video.