cancel
Showing results for 
Search instead for 
Did you mean: 

Error: Interlacing the process

Phuoc_Thanh
Associate

I am using STM32H7 and using the M4 core to output GPIO to control peripherals.

I share data between the two cores using the share memory protocol.

On the M4 core, I have turned off all interrupts and only control GPIO, but when measured, there is still a delay of a few milliseconds => the output is incorrect in timing. And notably, this only happens when I enable DMA from SPI on the M7 core.

Can you tell me the reason and provide a solution?

2 REPLIES 2
TDK
Guru

This is going to be due to your code. A several ms delay is a long time. There is no reason you can't achieve a much quicker response. Be more specific on how you're sharing data between the cores, how you're measuring the delay. Sharing some code would be helpful. If it only happens when you do something on the M7 core, it could be due to the code running on that core.

If you feel a post has answered your question, please click "Accept as Solution".

Even if you use DMA, but your main program would wait for "DMA finished" - it would not do anything else, e.g. sending RPC to CM4 to toggle GPIO.

It depends on your "SW design": if you use RTOS - you should use semaphores, e.g. to sync with RTOS threads.
If all is without RTOS and you wait for "DMA completed" - all is waiting (and CM4 not triggered).

Esp. when you use a dual-core system - it is important to think about to use an RTOS, parallel threads, DMA with semaphores (or events) to release a thread. In a "singe threaded system" - even you have two cores - you would not make use of "parallel" performance. All depends on your "system design" (not a HW issue).