cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H755 user button interrupt in both MCUs

chrkaras
Associate II

Hello everyone,

 

I would like to ask if it is possible (and if so, how) to make both m4 and m7 get an interrupt made by the user button in in the nucleo board, since the only Pin Context Assignment options on CubeMX is either m4 or m7. Do I have to do it "manually" by writing the code to register the interrupt on the other mcu?

 

Thanks in advance!

1 REPLY 1
TDK
Super User

If you enable the interrupt on the other core using HAL_NVIC_EnableIRQ, you can get interrupts on both cores.

However, it's not a great system. If one core clears the interrupt flag, the other core may not get the interrupt in time. The flag can only be cleared once, so it's hard to process it when both cores are accessing it at the same time. This introduces race conditions. That is the reason STM32CubeMX is not set up to do this.

A better scheme would be to send an event to the other core. Let one core process the interrupt and notify the other core when appropriate. Look at "Event notification" here:

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

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