Tool/software:
Hello
I am developing a project based on the MultiRole example. My question is how to set priorities correctly.
Let's say I have three tasks.
1. ICall task. I assume that this task is responsible for interacting with the radio channel equipment. Its priority is 5.
2. MultiRole task. This is a user task that processes incoming events from the RF stack. That is, it reads data from the service, sends a notification, etc. Its priority is, say, 4.
3. Protocol task. This task receives/transmits processed data to the MultiRole task to communicate with another device. Its priority is currently 7 (the highest).
If for some reason the data processing in task #3 takes a long time, then due to the high priority, task #1 (ICall) will not be called, the active connection confirmation packets will not be sent. And therefore, the other side can terminate the connection unilaterally.
I assume that because of the high priority of 3, during which the connection will be disconnected, task 1 will not even know about the disconnection.
What are the rules for setting task priorities?
Should the ICall task have the highest priority among tasks that interact with the RF stack in any way?
Is it possible to increase some parameter in the ti _ble _config .h file that will tell both sides to wait long enough without exchanging packets (say 5-10 seconds) and not disconnect.