Replies: 1 comment 1 reply
-
For this use-case no timeout is needed as it will just try to receive again.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This issue is related to FreeRTOS eventGroups, semaphores in F'
@LeStarch suggested to use Os::Mutex as a substitution for eventGroups, semaphores but I used messageQueue instead.
Here is example:
Inside active component is used send_data():
void send_data() {
if (startSend()) {
waitSendEnd();
}
}
startSend initiates hardware data sending;
waitSendEnd waits until data sending ends.
void waitSendEnd {
queue.receive(); // waits in blocking mode since there is no way in OSAL queue to set timeout whereas FreeRTOS gives such opportunity
}
SendEndHandler {
queue.send();
}
Here is problem: if sendEndHandler didn't work (interrupt didn't finished for some hardware reason), the system will collapse because of invocation overflow (rateGroup will invocate run handler but the task is blocked because of waitSendEnd())
Similarly for receive_data:
void receive_data() {
if (startReception()) {
waitReceptionEnd();
}
}
If nothing will be received the whole system will be collapsed because task is suspended and wait for reception of some data.
The questions are:
Beta Was this translation helpful? Give feedback.
All reactions