cancel
Showing results for 
Search instead for 
Did you mean: 

Interprocess communication buffer swapping

JSIGA.1
Associate II

Hello,

I am working on IPC between M4 and A7 and it works properly using the "logic analyzer" example. I changed it according to my needs but not the buffers.

1 . I could read the data from 3 buffers, but often buffers are swapping. I would like to what causes this problem and how to solve it?

2. When I start IPC, one of the CPU processes goes into 100%. Is it normal for the IPC? and is there anything that I could change to reduce the CPU processes?

Thank you in advance

4 REPLIES 4
Olivier GALLIEN
ST Employee

Hi @JSIGA.1​ ,

Can you please provide some more context ?

Which OpenSTLinux version ?

Custom or ST board ?

I understand that default logic analyze was working properly and reported issues comes only with your 'changed it according to my needs' right ?

Could you share details of those changes ?

Thx

Olivier

Olivier GALLIEN
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.
JSIGA.1
Associate II

Hello Olivier,

I have a custom board which is based on stm32mp157A.

I am using openSTLinux Dunfell but i don't know which version exactly.

I am trying to send around 50kilobytes of data with frame numbers for every buffer from M4 to A7 in every 100ms. I have not touched the Sending part in logic analyze code of M4.

In A7, I haven't touched the reading part . When the buffer filled event occurred, I read the data and process those. (processing time of the 50kb data is 8 milliseconds in A7)

I am successfully reading the data without any frame loss or frame swapping from A7 for around 15 minutes. after that, the buffer swapping problem arises for a couple of buffers and disappeared, again in the next 2 or 3 mins, it appears again and disappeared.

Regarding my second question, I found a small bug in my code, which consumes a lot of CPU resources. after changing that the CPU usage has been reduced. but still, I have a buffer swapping problem.

JS

Olivier GALLIEN
ST Employee

Hi @JSIGA.1​ ,

No evidence here.

I guess it deserve a careful system debug to try to catch the root cause.

Anyway, maybe one clue to evacuate would be a potential cache coherency issue as per already faced in this post :

https://community.st.com/s/question/0D53W00000uXp2hSAC/rpmsg-sdb-cached-buffer

I attached the recommended patch to apply in rpmsg_sdb driver.

Let us know.

Thx

Olivier

Olivier GALLIEN
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.

Hai,

I have tried changing to DMA coherent, but it didn't help me in my case. Still, the problem persists.

JS