I developed my application on VF61 and it uses RPMSG communication between A5 and M4 cores.
Basically it works as expected, but the communication is not 100% reliable and some of the packets are lost.
In my scenario it’s always the A5 core that sends a message and waits for an answer from M4 core.
A5 core sends a new message every second with
Rpmsg_Write(), then waits for the handle
hReceiveGlobal created over
"DataAvailableEvent". The timeout for thie event is quite long (0.1 s).
When the event is received,
Rpmsg_Read() is called.
As far as I can see, one or two messages every 1000 (more or less) don’t see any answer from M4 core and the handle timeouts.
So I started to debug inside M4 core and I use a GPIO: M4 core set it high every time it receives a new messgae from A5
rpmsg_rtos_recv_nocopy() and set it low after he sends the answer calling
I see that M4 core receives every message sent by A5 core and it calls
rpmsg_rtos_recv_nocopy_free() every time after 4 or 5 ms.
So I suspect two possible reasons for the missing answers:
- some errors inside M4 functions (but in this case the behavior should be similar when A5 runs Linux)
- some race conditions or whatever in CE 6 RPMSG functions
Can someone provide some ideas on how to debug deeper this scenario?