I know that this topic was debated a long time ago (link: Difference between interrupt and event ), even though, I don't consider the answer adequate. The reason is the next: when one talks about events versus interruptions, the term events signifies something about hardware and not software. Moreover, according to that explanation, an event is predictable, not something which comes across suddenly, but, in the case of a wake-up event, this cannot be true, because this event is not "expected", it is something spontaneously. For instance, one may look at the stm32 datasheet and notice that there is a so-called wake-up event enable register. This "event" involves neither a specific piece of code to be executed nor something related to software stuff.
Related Questions in EVENTS
- Stop propagation of javasript/leaflet click event that starts in one element and ends in another
- Detecting click inside and outside of the listening component in Angular
- How to use mocha unit test chokidar watch events
- writing event_management in unity
- Where to put event handler method of an inherited class in C++ Builder?
- Event_date reference in CTE
- WinForms, event unable to subscribe from a custom class
- How to intercept a request made by a form submit in JavaScript?
- Communicating from Parent to Child in Blazor
- How to Customize Sitecore Copy operation
- grand parent is handling custom event emitted instead of parent in Angular 17
- jquery not capturing all input value changes
- Is there a way to force the focus on a determined window tab?
- How to watch user browsing activity from a background service?
- Trigger Once in React native
Related Questions in EMBEDDED
- MSP430F5529 on the MSPEXP430F5529LP: UART is not actually transmitting despite seemingly correct setup. What is wrong?
- A FPGA Project Proposal where I can use both PS and PL
- Program doesn't run after DFU
- Sending struct through queue
- How to generate a VPI warpmap for polynomial distortion correction?
- How to present this example concept in UML: Using 2 LCD displays in C/C++
- CLion: Debug via St-Link
- Portenta H7 Baremetal Development and a Little Guidance on Embedded System Learning Roadmap
- STM32 RTC3 Mixed Mode: Writing TR resets SSR
- Unable to read value from gpio set as input
- Mbed TLS: in-place en-/decryption for OAEP doesn't seem to work
- Shared variable read from low priority thread in preemptive scheduling
- Own Pattern / framework for interfacing with components in C
- Performance Difference Between Global Variable and Local Variable in Embedded Systems
- Comparing analog signal from Electret mic with samples
Related Questions in INTERRUPT
- the end of the I/O operation is notified to the system by an interrupt.how much system time do the mentioned operations occupy?
- Unable to set an interrupt affinity in linux?
- fastLED degrades PWM outputs Arduino
- Difficulty understanding virtual LPIs in GICv3
- IRQ interrupt obtaining abnormal possibilities
- MKL02Z32xxx4 (FRDM-KL02Z Board) Timer overflow interrupt not firing
- Interrupt handling with push buttons in ARMv7
- Ultrasonic range finder HC-SR04 using one timer
- Does the Direct Memory Access (DMA) interfere with the execution of user program execution?
- How to write the external interrupt callback function of Linux kernel v3.10?
- Interaction with a thread from ISR using C++ Standard Library on ESP32
- Global variable value doesn't change in ISR in C
- The module first installed the alarm when it started
- ATTiny1606 Timer TCA0 interrupt not triggering
- RT linux isr routine
Related Questions in HARDWARE
- Is cartopy projections are computaionally heavy?
- Memory location changing from 0 to 1 consistently on Mac
- How to adjust differences of hardwares while executing code
- Read/write data to DS1642
- How can I get current cpufreq in kernel code?
- Is it possible to fetch iPhone device model number (MT552GR/A) programatically?
- The problem with running the Simulink model on arduino uno
- In VSC and other apps, when i scroll the text becomes black and turns normal after a very short delay 100ms. It is really annoying
- ERROR in rc_mpu_calibrate_accel_routine, center of fitted ellipsoids(in beagle bone blue)
- Will the 16n prefetch in DDR5 affect the bandwidth of small-granularity memory accesses?
- suppose a program is running on 5 threads.If an extra thread is added,what factors should be considered?
- Signed Driver rejected by Windows 10
- How to randomly simulate keypresses for special keys
- How does a TLB manage memory translation for addresses that cross page boundaries?
- Get number of RAM channels as a property of the system
Related Questions in MCU
- Failing write/read on RH850 with NOR flash
- Comparing analog signal from Electret mic with samples
- No tinyusb CDC's callback is called
- Interrupt not working - Controlling PWM using DMA with STM32 MCU
- cJSON_Parse() causing parse error for JSON files with more than 50 lines on Renesas MCU with NextX module
- Solution prevents people who do not have a key from downloading firmware to the MCU
- Is it possible to implement dynamic webpage using RAW API of LwIP (Light weight IP).?
- UART Transmissions from MSPM0G3507 not working when connect to STM32G474, but working when have Jlink connected in parallel
- internal registers, difference between temporary and argument-registers
- struggling with evaluationboard "WCH32v307v R1 1v0" right at the start
- Assembly Language for MCU 8051 IDE with AT89S52 microcontroller
- Not Getting Any Output to Port Nucleo-64
- ESP32 Microcontroller ADC conversion problems
- Detecting SCL/SDA ports
- How can I use STM32 sleep mode with UART
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Events is a higher abstraction layer concept, usually found in system or application programming. They are not necessarily based on hardware, but could be purely triggered by software. There is no single definition of the term, it's pretty broad.
Interrupts on the other hand are always triggered by hardware, on the lowest level. Yet another term is hardware exceptions, upper-tier cores and microcontrollers often separate those as something thrown by the core or supervising hardware when some abnormal condition occurs (invalid instruction, divide by zero, memory access errors etc). Whereas interrupt sources could either be expected hardware behavior or some error condition.
Interrupts and hardware exceptions require the handler function to be registered in a hardware look-up table often called interrupt vector table. The hardware will go to this table when the interrupt occur to find the address of the function to call - such functions are named interrupt service routines (ISR). There will be a special calling convention for interrupts, where certain registers are stacked by the hardware before the ISR is called, and special return instructions from are used to restore the registers when the ISR is finished.
Events however use software callback functions, typically by the application passing on a function pointer upon event creation. That's typically how they are used in application programming and Rapid Application Development (RAD) tools. In embedded systems one might create something similar by letting the application register a number of callbacks for certain things that occur inside a driver, then let the driver call the callback. But even though a driver is the lowest-level code on top of the hardware, it is still software and performing a call designed by software.
But since "event" is such a broad term, in some cases events are objects that can be used together with broader API functions. And then they don't necessarily have a callback function - they are essentially just flags. In the Windows OS for example, the application programmer can create an event to signal something to a running thread, after which the thread can utilize a CPU effective sleep function and wait until the event is received. This is one of the normal ways to properly stop a thread by letting it finish up gracefully by itself.
What interrupts and events have in common is that they both lead to effective but non-deterministic execution. The program can do other things when the interrupt/event hasn't fired and it doesn't need to use polling of some flag, which is the alternative to interrupts. But when it fires, it aborts the current execution and disrupts it by executing something else. Also, it pushes some extra call on the stack in addition to the present call stack, so if it happens when the program is at its deepest call level, you can get very subtle errors like intermittent stack overflow.
Another issue with interrupts and possibly with events too is that they most often act as separate threads, with all the thread safety issues that come with them. You'll need to protect variables shared with the ISR/callback from race condition bugs, either by semaphores or by guaranteeing atomic access. Failing to do so is I'd say by far the all time most common error in embedded systems. This too creates incredibly subtle bugs.