Hello,
I am using rpmsg to communicate between a linux (A53) and a FreeRTOS (M4) on an imx8 through a rpsmg driver based on imx_rpmsg_tty.c.
M4 implementation is based on example rpmsg_lite_str_echo_rtos_imxcm4 with last SDK SDK_2.8.0_EVK-MIMX8MM
When established, the communication works well, sending and receiving is fine. But when I reload a FreeRTOS image on the M4 side…all the previous sent rpmsg messages will be received from the M4 again.
Afterwards I can send and receive new messages normally. But it seems that the virtio buffer ring in the shared memory remains “valid” even if I run "rmmod" of the kernel module and reinitialize the rpmsg communication on the M4 side.
Here are the steps that are done:
- Load the M4 firmware (/usr/bin/m4fwloader …) : OK
- modprobe of rpsmg tyy driver : OK
- Start the M4 firmware (/usr/bin/m4fwloader kick 0) : OK
- Exchange data between Linux application and M4 through rpmsg tty driver : OK
- Kill the M4 firmware (/usr/bin/m4fwloader stop) : OK
- Remove the driver (rmmod …)
- Load the M4 firmware (/usr/bin/m4fwloader …)
- modprobe of rpsmg tyy driver : OK
- Start the M4 firmware (/usr/bin/m4fwloader kick 0) : KO : lost of old messages are received in a row by M4 (those from step 4)
Do you have any hints to help ?
Do you think it most likely comes from the rpmsg driver or from a bad init (or missing init) on the M4 side ? Who is responsible for clearing the rpmsg vring queues, and how ?
Thanks,
Olivier