STM32H7 - Handling with 2 MPUs
Hello, the STM32H7 (dual core) has two dedicated memory protection units. If I configure one MPU to make a memory region only accessable as readonly, does the memory protection unit from the other core inherit those configuration or is it bypassing this configuration as it is following its own MPU configuration.
As all periphericals are theroteically accessible by both cores, can one core call the MPU API from the other core in order to configure it? In the end, one core could start a routine in order to configure both MPUs? If yes , how can I do that (example, description, etc.)?
If I have global variables within the scope of a file which is controlled and accessed by one core, can the other core read/modify the global data directly? Or do I get some compilation errors when I try to do that? Can I solve that with a "extern" attribute for those variables which are "in the hands" of the other core? Or do I need to use specific compiler pragmas in order to force the placement into a specific RAM location - in order to know the starting address of the data which is accessed than by the other core?
For example, if I have a global buffer array g_i32arr[100] filled with valid values by one core, can I directly access g_i32arr[] by the other core? If not, how can I do it ?
Does ST provide some example code in order to evaluate that mechanism with two MPUs? Especially for the use case if several peripherical resources should never be touched or executed by one core. Are there some examples around?