2019-04-17 09:55 PM
i want to execute few lines of code on both edge of input pin i know about interrupt but what is external event ?
2019-04-18 05:03 AM
Read the reference manual about EXTI. Examples of code are usually in the downloaded cube library, nucleo boards, EXTI project examples.
Rise and/or fall edge of signal can trigger an interrupt or a signal which can propagate to other peripherals without sw intervention.
2019-04-18 07:43 AM
An interrupt can to two things: cause software to execute via an interrupt handler (if the interrupt is enabled) and cause some peripheral to do something (like triggering a timer). An event doesn't cause the interrupt handler to run, but can cause some peripheral to do something. Since you need "to execute a few lines of code" on both edges, you need to use interrupts.