Hi @hfranco.tx ,
Thanks for the reply. I will test your overlay and update you soon.
Please also note the following important details:
I haven’t described my issue and test cases in detail. So, I am sharing now:
(1) Understanding the Problem:
First, I have customized Device Tree with the help of this article:
RPMSG does not work on IMX8M-Plus - Technical Support - Toradex Community
Then, I have tested RPMSG on BSP 6.0.0. It works very well.
Here is the screenshot of working “RPMSG string echo example”.
(Sorry that the code of M7 is bit customized. I have this only screenshot available for now.)
Left side (Linux Terminal) is the log of messages which is received from Cortex -M7 and on the right side (M7 Terminal), there is a log of messages which is received from Linux.
It was working fine, and I have tested it by sending hundreds of messages in both directions.
Secondly, we are using Qt based software on Linux side for our application.
So, we have attached the /dev/ttyRPMSG30 port to QtSerial.
For this application, we have tested RPMSG by sending message from Qt software to Cortex-M7 firmware and it was working.
Now, problem came when we were testing our Qt software with M7 firmware.
RPMSG was initializing and working well. But after some time, we were getting error of:
imx-rproc imx8mp-cm7: imx_rproc_kick: failed (1, err:-62)
So, I have to power off and restart the board. Again, RPMSG works for sometime and it stops working after transferring a few messages.
Here is the screenshot of the error.
Left side terminal (COM6) is the debug output of M7 firmware. You can see that nameservice is enabled and after that we have transferred a lot of messages between both M7 and Linux.
Right side (COM7) is Linux debug output where we can see the rproc error which we have got after some time. (Note: “modprobe imx_rpmsg_tty” is run from Qt software. So, this command is not showing in debug output.)
(2) Test Cases:
First, I thought it was conflicting with I2C3. So, I have tested it many ways as mentioned in previous posts. As the result, I found that this might not be the problem as I2C3 is disabled from device tree.
From the NXP SDK’s M7 RPMSG example, I have tested RPMSG by transferring hundreds of strings with the delay of 1 millisecond. It was working there. But as soon as I try Qt software with whole M7 firmware, it shows error after some time.
I am only guessing that maybe is it conflicting with other peripherals or so? I have attached many peripherals in my M7 firmware, and it is a large code. However, probability of this type of conflict is near to zero from my point of view.
I am not using remoteproc to load the firmware but only using UBOOT or JLINK. You can find BOOTAUX.txt & JLINK.txt log files of Linux in previous post where you can also see that RPMSG is initializing and working fine. So, this cause is also ruled out.
I will also test your overlay and update you. But there is the problem that, I have to test it with my firmware and hardware mapping. So, again I will end up with customized device tree.
RPMSG is working fine usually. But problem comes after some time. It automatically disables and we are struck with the error of imx-rproc imx8mp-cm7: imx_rproc_kick: failed (1, err:-62) .
Timing of the error is very random. So, we cannot easily debug or relate it with any error from our code side.
Due to the weird timing pattern of this error, I am guessing that anyhow remoteproc is crasing by unknown reasons and that is why RPMSG is stopped working.
(4) Solution Finding Process:
One way to solve this error is by understanding reason of this error. I am unable to find data of this error over the internet. Can you describe me what this error is suggesting or what this error code -62 is refering to? Maybe that way, I can debug from my side the cause of this problem.
If you have any other idea or test cases, please share it with me.