cancel
Showing results for 
Search instead for 
Did you mean: 

在我试用stm32_rpmsg_sdb驱动测试大数�?�传输时,�?�到数�?�传输错误的问题

Yji.1
Associate II

CM4:基于官方给出的例�?,我去掉通过IO�?�数�?�采样​,采用填充固定数�?�进入缓冲区的方法,在传递到DDR的相应缓冲区中。

A7:基于官方的测试例�?,�?写入文件,直接将接收到的数�?�显示到频幕上。​

我�?�现,在多次数�?�传输�?�,Linux应用程�?读�?�​的DDR数�?�出现错误,这些数�?�以64字节为�?��?。

如下图所示,我填充的时0x1f,但是缓冲区中出现了0x1c和0x16,他们都是之�?写入的数�?�。​

请问这个问题�?�能是怎样造�?的。​

0693W000000UwVRQA0.png

9 REPLIES 9
PatrickF
ST Employee

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.

In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
MCATR
Associate II

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.

I send data very slow ,about 1024 bytes per 1s.

but in my test stm32_rpmsg_sdb program, I get 4096 buffer.

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?

I change your code, M4 sample adc and send data 2K bytes/s.If i use rpmsg_tty, i can finish it,but linux program is very busy. It is not a good idea. so i want usb rpmsg_sdb.

Yji.1
Associate II

this is my linux program. please give me some advise.

It's a mistake, send data 2Kbytes/10 milsecond

MCATR
Associate II

​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

thank you , MCATR. I'll try it by rpmsg_tty again.