Skip to main content
HDesa.1
Associate III
June 6, 2024
Solved

STM32H7 dual core connectivity protocol handling

  • June 6, 2024
  • 11 replies
  • 3649 views

Hello,

Could you please help me with handling a same channel I2C protocol between 2 core.

I have two devices connected on the same I2C channel(I2C1). I want to run one device on M7 core and another on M4 core. How to handle the communication between the devices and the microcontroller so that there is no interference during communication?

- Regards

Hrishikesh

This topic has been closed for replies.
Best answer by mƎALLEm

As I said you need to handle that with semaphores. I'm not expert of i2c but you need to test. 

If you face a synchro issues, I think you can opt with my first scenario: one core handles the comm + one slave and the second core handles the second slave.

Hope I answered your question.

11 replies

Associate II
June 6, 2024
HDesa.1
HDesa.1Author
Associate III
June 6, 2024

Hello,

Thank you for the reply. The link which you have shared provides the concept or direction for implementation.

Are there any resources, which provides the method to do so. May be a sample code or the module which should be used.

-Regards

-RegardsHrishikesh
Associate II
June 6, 2024

i don't have any resources regarding this topic

but to be honest i would question the concept. why would you handle the same bus from 2 controllers? what's the usecase for this? handle the i2c with one controller and exchange data between controllers if needed

mƎALLEm
ST Technical Moderator
June 6, 2024

Hello,

Not clear what do you mean by this: " I want to run one device on M7 core and another on M4 core"

Do you have two I2C slave devices connected on I2C1 interface and you need to handle one slave data with CM7 and the other one with CM4?

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.
HDesa.1
HDesa.1Author
Associate III
June 6, 2024

Hello,

Yes I have two I2C slave devices on I2C1 channel. I want two handle them on separate cores.

My question is how can it be done without causing interference between the devices during communication.

-Regards

-RegardsHrishikesh
mƎALLEm
ST Technical Moderator
June 6, 2024

I think you can implement that by data exchanges between cores:

One core will handle the communication of the two slaves and manage the data of one slave. It will send/receive data of the second slave to the second core.

Refer to that article: https://community.st.com/t5/stm32-mcus/stm32h7-dual-core-how-to-communicate-between-cm4-cm7/ta-p/49656

and especially: AN5617 Application note: STM32H745/755 and STM32H747/757 lines inter-processor communications

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.