Questions tagged [interrupt]

Use for questions related to interrupt signals and interrupt handling.

In computing, an interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution.

A hardware interrupt happens in response to some hardware event (say mouse movement) and causes the processor to save its state of execution and begin execution of an interrupt handler. At the same time, the possibility for this interrupt is disabled (to prevent it happening repeatedly) and must be re-enabled by software after the current interrupt has been serviced.

Interrupts are usually identified by number, and normally there is a system table somewhere in the OS that maps this number to the address of function that must service the interrupt.

Software interrupts as seen by the programmer do not differ much from the usual function calls. However they are usually implemented as specific instructions in the instruction set so may require less code to be called. Software interrupts are processed in a very similar way to the way hardware interrupts are processed, often using similar context switching and a shared interrupt table for both.

3261 questions
1
vote
1 answer

C++ While(1) loop is not calling if statement inside it

I've got an interrupt that sets a flag, a bool called recvd as so: while (radio.available()) { // Fetch the payload, and see if this was the last one. radio.read( &receive_payload, len ); recvd =…
foldone
  • 143
  • 9
1
vote
1 answer

Confusion regarding #interrupt-cells configuration on PCA9555 expander

I'm trying to setup a device tree source file for the first time on my custom platform. On the board is a NXP PCA9555 gpio expander. I'm attempting to setup node for the device and am a bit confused. Here is where I'm at with the node in the dts…
zeus_masta_funk
  • 1,388
  • 2
  • 11
  • 34
1
vote
0 answers

Different ways to to trigger a SMI for a processor

I am writing some firmware code running in the System Managemnt Mode (SMM) on an Intel platform. I want to fully understand how my SMI handler get started. I read from the Intel Manual that: The only way to enter SMM is by signaling an SMI through…
smwikipedia
  • 61,609
  • 92
  • 309
  • 482
1
vote
2 answers

pulse sensor + arduino mkr1000 to calculate BPM

tldr; what is an easy/logical way (for a beginner) to calculate BPM using pulse sensor and mkr1000? I don't want any visualizations or processing sketch, but just print BPM values Please bear with me, I am a newbie at this and i've tried my best to…
rp2402
  • 23
  • 1
  • 3
1
vote
2 answers

Embedded System - Polling

I have about 6 sensors (GPS, IMU, etc.) that I need to constantly collect data from. For my purposes, I need a reading from each (within a small time frame) to have a complete data packet. Right now I am using interrupts, but this results in more…
neophyte
  • 55
  • 6
1
vote
1 answer

ARM: How does VIC interact with flash vector table?

I have problems getting an interrupt-driven LED flasher going on an ARM LPC2138. If I change to polling the timer, it works fine, so the problem seems to be the interrupts. The program is essentially a copy of demo code off the web, adapted for my…
BruceV
  • 117
  • 2
  • 10
1
vote
1 answer

How do i capture each time the Operating System OR the Active Window is busy

I am trying to capture Windows system busy, or Active window busy, from the perspective of the end user (typically when the Windows OS or the active Window puts up a Busy Cursor: or to capture when the system is busy). I am trying to do this…
1
vote
1 answer

ARM timers and interrupts

I'm going to learn how to work with timers and interrupts using ARM micro-controllers. This is my code: #include "LPC17xx.h" int flag=0; void TIMER0_RIQHandler(void) { if (flag == 0 ) { LPC_GPIO1 -> FIOSET = 1 «28; …
Sadra Nasiri
  • 5
  • 1
  • 4
1
vote
2 answers

Question regarding the interrupt and interrupt handling

Could you please let me know how the hardware/driver raises an interrupt? and in an SMP, which CPU gets interrupted? If IRQ is shared by multiple devices, how the kernel identifies the which device caused the interrupt. /Ganesh
Ganesh Kundapur
  • 525
  • 1
  • 6
  • 13
1
vote
1 answer

PIC32, Differences between Interrupts

What is the difference between INTDisableInterrupts() and INTEnableSystemMultiVectoredInt() and asm volatile ("di")
newb7777
  • 517
  • 5
  • 22
1
vote
0 answers

Reboot loop when enabling interrupts with sti

Whenever I try to enable interrupts using the sti command, the emulator instantly reboots. I am executing the following code in protected mode on bootup: void* idt = (void*) 0x00000; struct { uint16_t length; void* base; }…
user5501885
1
vote
3 answers

STM32 HAL GPIO interrupt count too much

I've got the following problem: I've got 2 inputs on my electronic board: #define TOR1_IN_uC_Port GPIOC #define TOR1_IN_uC_Pin GPIO_PIN_5 #define TOR2_IN_uC_Port GPIOE #define TOR2_IN_uC_Pin GPIO_PIN_6 I've got…
Grokiff
  • 29
  • 5
1
vote
2 answers

What happens if when a system call is being executed, the hardware timer interrupt fires?

Say we have one CPU with only one core, and there are many threads that are running on this core. Let's say that Thread A has issued a system call, now the interrupt handler for the system call will be executed. Now while the the system call is…
user4582812
  • 591
  • 1
  • 4
  • 16
1
vote
2 answers

Does the kernel stop running "on its own" when the OS is "fully loaded"?

Let me explain how I think a kernel works: When the computer is powered on, the kernel will start running (the BIOS will run the boot loader, and the boot loader will run the kernel I think). Now the kernel will do some work (for example:…
user4582812
  • 591
  • 1
  • 4
  • 16
1
vote
3 answers

Assembly video mode coordinates mapping to character coordinates

I am working on an 8086 dos assembly project , using video mode i was able to draw some lines and stuff but now i want to print some characters and found that (interrupt 10,2) uses character (row,col) coordinates that is different than video mode…
Ahmed Kotb
  • 6,269
  • 6
  • 33
  • 52