cancel
Showing results for 
Search instead for 
Did you mean: 

RPMSG SDB0 Driver Issue

NPal.2
Senior

Hi all,

I am trying to achieve DDR data transfer between M4 and A7.

So I followed How to exchange data buffers with the coprocessor - stm32mpu article and built a yocto image.

I have stripped down the logic analyzer application : here .

  1. On CM4 side it just transfers data from a another MCU pushing in data at UART7 and transferring that via DMA to DDR buffer.
  2. SDB Driver unchanged.
  3. On the Application side , I have removed all GTK related things and just stripped it down to receive data to DDR buffer and print to a console.

I have few questions of concerns:

In case of the CM4 code provided here : Link

There no support in the latest cube-mx to create an RPMSG_HDR_HandleTypeDef type object which might be labelled as /dev/tpmsg-sdb type in user space application.

Although the data structure is similar to VIRT_UART_HandleTypeDef. So I went ahead and made and rpmsg-sdb object of the later type.

Now when I run my stripped down application part of attached zip. I get below error on A7-console :

CA7 : Forward efd info for buf0 with mFdSdbRpmsg:5 and efd:6
./backend: failed to set efd: Inappropriate ioctl for device

Note that now I get 3 devices : ttyRPMSG0 , 1 , 2. So in order to identify which is the sdb one I initialized it at the last in M4 code. Not sure if that is right way.

Kindly advice what might be potential root cause of issue here.

1 ACCEPTED SOLUTION

Accepted Solutions
NPal.2
Senior

Update : Never mind. Solved it. There was a minor change in the CM4 project, where in there was an extra file set : rpmsg_hdr.c / .h was created to handle the data transfer over rpmsg-sdb channel. After making those changes in the CM4 side. Seems to work now perfectly.

View solution in original post

2 REPLIES 2
NPal.2
Senior

Update : Looks like the stm32_rpmsg_sdb driver gets loaded , but there is no device called : /dev/rpmsg-sdb which shows up.

NPal.2
Senior

Update : Never mind. Solved it. There was a minor change in the CM4 project, where in there was an extra file set : rpmsg_hdr.c / .h was created to handle the data transfer over rpmsg-sdb channel. After making those changes in the CM4 side. Seems to work now perfectly.