cancel
Showing results for 
Search instead for 
Did you mean: 

Stm32 h7

SDall
Associate II

hi I wanted to ask regarding stm32h7 as I have two main available one for m4 main and the other for m7 main, if I process a variable in the cortex m4 how can I transfer it to the m7?

Can i use mdma or dma.....

Tanks​

4 REPLIES 4
Rainer1
Associate III

There are several examples in the STM32H7 Cube FW in the H745 folders, where this scenario is used.

In general:

  • Place the shared variables in a SRAM region accessible by both cores, i.e. SRAM1 - 4
  • guarantee cache integrity for the CM7, the easiest way to do this is excluding the memory area from dcache by setting up a corresponding MMU section
  • guard the access by a HSEM semaphore
Rainer1
Associate III

The two cores don't understand the variables in the other. Each core has code compiled and linked independently.

Determine what information you are passing or sharing, and encapsulate that in a structure with the same form, and at address space visible to both cores. Pointers can be used to set the structure address.​

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
RMcCa
Senior II

You can also use the MDMA. The m4 core can initiate an mdma block transfer which can then cause a transfer complete interrupt on the m7. No cache problems, just make sure the m4 knows the destination address somehow.​