Skip to main content
SDall
Associate III
Jun 10, 2020 11:06 AM UTC
Question

Stm32 h7

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​

This topic has been closed for replies.

4 replies

Rainer1
Associate
Jun 10, 2020 12:01 PM UTC

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
Jun 10, 2020 12:23 PM UTC
Tesla DeLorean
Guru
Jun 10, 2020 12:50 PM UTC

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
RMcCa
Senior II
Jun 10, 2020 3:35 PM UTC

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.​