cancel
Showing results for 
Search instead for 
Did you mean: 

sharing data between two cores of H7

Jack_DB
Associate II

Title edited - originally said, "sharing data between two boards"


Good day y'all,

I'm trying for the first time to have the two cores on a H7 board share data between one another on shared memory, in particular cm7 writing data and cm4 read it. 
From what I understand I need to use a semaphore to signal back and forth to alert the cm4 when there is new data in every iteration, the theory I get, but I'm not sure of the shared memory allocation and the semaphore correct availability. Is there any example code I can see to understand how it's supposed to go? I tried looking at the ide examples, but anytime I try to open the example folder the ide application just dies :\ 

Thx all for the advices, 

P.S. I'm also using FREERTOS but it's not supposed to cause any problem but you never know 

6 REPLIES 6
Andrew Neil
Super User

@Jack_DB Your title says, "sharing data between two boards", but you actually seem to be talking about sharing data between the cores in one chip - therefore on the same board ?

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.

Yeah sorry misspoke, I meant two cores... 

OK - title edited.

 

I think OpenAMP (Open Asymmetric Multi-Processing) is what you're looking for - see:

https://community.st.com/t5/forums/searchpage/tab/message?filter=location&q=openamp&location=category:knowledge-base&collapse_discussion=true

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.
mƎALLEm
ST Employee

Almost the same question asked in this post: How can I bridge between two cores in STM32H745 to share data?

As you are using FreeRTOS, from the AN5617: the usage of stream buffer/message buffer in FreeRTOS context:

screenshot.png

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.
Andrew Neil
Super User

@Jack_DB wrote:

P.S. I'm also using FREERTOS  


So take a look what facilities FreeRTOS itself provides for inter-processor comms & multiple cores; eg,

Multicore advice and suggestions

Simple Multicore Core to Core Communication Using FreeRTOS Message Buffers

A complex system that works is invariably found to have evolved from a simple system that worked.
A complex system designed from scratch never works and cannot be patched up to make it work.