0

According to Stm32 Event and interrupts , STM32 events are mainly for controlling other peripherals.

Is there a way on the MCU itself to detect if an event fired? That is, I don't need to interrupt current execution. I just want at some point to check "Did an event fire?". Can I do that? Or do I need to use the interrupt mechanism?

The data sheets show how to cause events to trigger, but make no mention if any register shows an event fired.

SRobertJames
  • 619
  • 5
  • 14
  • In older STM series (e.g. STM8 or ST7) it was possible to query hardware flags (through status and/or control registers) inside the while(1) loop. I expect a similar thing in STM32 although these flags must be under HAL control i.e. they can be cleared automatically before/after IRQ execution (I'm not sure, though). – Rohat Kılıç Sep 08 '23 at 07:57
  • 1
    Events are for signaling between peripheral modules, while interrupts are for sinalling from peripheral modules to the core. They're both generated by the same mechanism within the peripheral which causes the event or interrupt. So if you want to know if an event has been generated, you only need to look at that peripheral's interrupt status register. – brhans Sep 08 '23 at 13:52

0 Answers0