2020-03-29 05:21 PM
CM4:基于官方给出的例�?,我去掉通过IO�?�数�?�采样,采用填充固定数�?�进入缓冲区的方法,在传递到DDR的相应缓冲区中。
A7:基于官方的测试例�?,�?写入文件,直接将接收到的数�?�显示到频幕上。
我�?�现,在多次数�?�传输�?�,Linux应用程�?读�?�的DDR数�?�出现错误,这些数�?�以64字节为�?��?。
如下图所示,我填充的时0x1f,但是缓冲区中出现了0x1c和0x16,他们都是之�?写入的数�?�。
请问这个问题�?�能是怎样造�?的。
2020-03-29 11:33 PM
Hi,
Please use English language on this forum.
Could you also add more information on the version of the SW Ecosystem you are using (latest is v1.2.0) and which HW board you are using (DK1/DK2, EV1 or custom).
Regards.
2020-03-30 11:38 PM
Hi,
could you please tell me the data rate you are using ?
On the example, the maximum data rate, due to packing algorithm on M4, was 8MHz.
In your case, I guess that the data rate can be much higher, but this information is very important to reproduce the issue.
Regards.
2020-03-30 11:45 PM
I send data very slow ,about 1024 bytes per 1s.
but in my test stm32_rpmsg_sdb program, I get 4096 buffer.
2020-03-30 11:57 PM
SDB means Shared Data Buffer; and the goal is to exchange high data volume thanks to big buffers.
In our example, M4 fills a buffer of 1MB, and then the driver transfers this 1MB buffer.
At the maximum rate, 8MHz sampling, with a packing of 8, it means we have one transfer of 1MB per second.
In your case, it would take 1000 seconds to have one transfer.
So, I don't understand your configuration.
Would it be possible please to share your M4 code?
2020-03-31 12:38 AM
2020-03-31 12:39 AM
2020-03-31 12:49 AM
It's a mistake, send data 2Kbytes/10 milsecond
2020-03-31 02:01 AM
I checked your code and I saw at leat one isse:
you modified the size of the buffers:
#define SAMP_DDR_BUFFER_SIZE (1024)
instead of 1024*1024
Then, this is not in line with the sdb driver, which manages buffers of 1MB
In your use case, you have a low data rate exchange betwwen A7 (Linux) and M4, and you don't need sdb to do this.
I would advice to exchange data over virtual UART, instaed of SDB.
Please have a look into M4 examples : OpenAMP_TTY_echo
2020-03-31 05:16 PM
thank you , MCATR. I'll try it by rpmsg_tty again.