cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H745: Read one GPIO pin from both cores

DanielB
Associate

Hallo all,

I am currently playing around with the NUCLEO-H745Zi-Q board. I was wondering if it is possible to read a GPIO pin on both cores without taking care of synchronization. I realized that there is no such option in CubeMX. In Pin Context Assignment we can choose between ARM Cortex-M7, ARM Cortex-M4 and free.

So I made up a little example: I want to read the state of the boards push button and set the state of two LEDs accordingly, one with each core.

So I first generated code assigning the pin to one core and afterwards I generated code, assigning the pin to another core. Finally I merged the two source codes, added the LED stuff and flashed it. It seems to work like a charm.

So now I am still wondering: Is it ok to do it that way? Are there potential problems? Is there a “right” way to do it?

 

1 REPLY 1

Should be able to read the GPIOx->IDR from either core

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