Skip to main content
Ashah.2028
Associate
December 4, 2019
Question

With STM32H745 I want to share information between the cores. For this I defined a structure in each core and linked to shared SRAM4 region. I can successfully get data with same core write-read and M4write-M7read. But face problem for M7write-M4read

  • December 4, 2019
  • 6 replies
  • 1316 views

Always get '0' for M7write-M4read.

This topic has been closed for replies.

6 replies

Tesla DeLorean
Guru
December 4, 2019

Check MPU and cache/write thru settings, and make sure to flush the write buffers with a fencing instruction. Think _DSB and DFlash Clean.​

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
December 4, 2019

I have this working just fine without any DSB instructions, just defining the variable as volatile which forces the compiler to reload it at every access.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Tesla DeLorean
Guru
December 4, 2019

Across two cores, with deferred write buffers, pretty sure you're going to need to get more involved than telling the compiler it's volatile...

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
TDK
December 4, 2019

I’m reporting my experience. Gnu compiler. Im not guessing at the underlying architecture or what theoretically should/could work.

On this chip, does each core have a deferred write buffer?

"If you feel a post has answered your question, please click ""Accept as Solution""."
Ashah.2028
Associate
December 5, 2019

 By defining as volatile, I got little success. But got satisfactory result after disable of Icache and dcache in M7 i.e. comment out SCB_EnableICache and SCB_EnableDCache functions in main file. ​

Thank you all.