In reply to dave_59:
Sorry the code is incomplete, the arbitrate task will eventually have multiple mailboxes so I will have some chain of if else branches. I Understand the point about the fork join.
To give more context on what’s going wrong basically say I put into this lkup_mbx 3 messages a, 8, 0. Without the fixed 900ns delay in my lookup_driver task I get the messages from the mailbox as I expected:
Time 60000, Got Lookup Request a
Time 65000, Lookup Key a
Time 80000, Got Lookup Request 8
Time 85000, Lookup Key 8
Time 100000, Got Lookup Request 0
Time 105000, Lookup Key 0
When I have this 900ns delay in my lookup driver I don’t see the second message:
Time 60000, Got Lookup Request a
Time 65000, Lookup Key a
Time 80000, Got Lookup Request 8
Time 100000, Got Lookup Request 0
Time 975000, Lookup Key 0
Time 1885000, Lookup Key 0
So it looks like I put message 8 into the mailbox ok but when I do the get I don’t see that message. I thought having the delay blocking would not be an issue since the arbitrate task will only call the lookup_driver when the cam_busy (semaphore) is released. Seems like some issue around this 900ns delay but I cant really understand what that is. I am coming more from a design background so apologies if this is a little bit muddled.