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

Timer Interrupt and UART Receive Interrupt

I am a newbie with programming and I am having trouble getting my interrupts to work the way I want them to for my application. I want to send serial data over the UART to the PSoC, store the values every second, and then echo back the stored…
1
vote
2 answers

STM32 NVIC ADC interrupt not triggering

I have an STM32F411VET and I want to have interrupt triggered after ADC conversion is finished. Documentation says following: In Single conversion mode the ADC does one conversion. This mode is started with the CONT bit at 0 by either: setting…
hrust
  • 734
  • 1
  • 11
  • 34
1
vote
1 answer

STM32 multi channel input capture overcapturing on all channels (interrupts not getting executed)

I have a STM32F302CBT6 (running at 72MHz) project where i need to measure the frequencies of 4 signals, that are around 250kHz each. The signals are connected to TIM1 channels 1 - 4. Now, understanding, that 250kHz is too fast (or is it?) to handle…
Martin1
  • 35
  • 1
  • 6
1
vote
2 answers

Implement UART frame controller

I'm programming on a STM32 board and I'm confused on how to use my peripherals : polling, interrupt, DMA, DMA interrupt... Actually, I coded an UART module which send basics data and it works in polling, interrupt and DMA mode. But I'd like to be…
guillaume
  • 31
  • 1
  • 2
  • 3
1
vote
0 answers

Configuring a pin as interrupt ARM Cortex M3 STM32F1xx

I'm trying to configure Pin PD3 as external interrupt, here is my configuration, but it seems its not working. So I defined everything and configured it, I still can't get the interrupt working in falling or rising edge. void…
andre_lamothe
  • 2,171
  • 2
  • 41
  • 74
1
vote
1 answer

Interrupt a kernel module when a user process terminates/receives a signal?

I am working on a kernel module where I need to be "aware" that a given process has crashed. Right now my approach is to set up a periodic timer interrupt in the kernel module; on every timer interrupt, I check the task_struct.state and…
1
vote
1 answer

PCIe interrupt handling linux kernel

I am working on a PCIe Linux driver. I would like to register an ISR for the device. IRQ number assigned to the device by the Linux system is 16, which is shared by other(USB host controller) device also. (Checked by lspci -v). It is a pin based…
1
vote
2 answers

Python, How to stop a script midway?

Let's say I have this script: import time def menu(): n = raw_input("What do you want the script to do: ").lower() if n == "run": r = run() elif n == "exit": exit() else: print("Unknown command") …
Programer Beginner
  • 1,377
  • 6
  • 21
  • 47
1
vote
1 answer

overriding the interrupt vector table 8086 nothing happens

I'm building a small os as a challenge for myself. I read many articles online saying that to override the interrupt vector table you need to change the physical address of 0000: interrupt number*4 and 0000: (interrupt number*4)+2. I wrote down a…
Elad Ezra
  • 33
  • 10
1
vote
1 answer

Spurious Interrupt Handling

I am using p2041 with xr17v358 chip for serial interface.when I was running my test application I was showing disabling irq messages. After that I added some debug prints in my isr so I get to know that even though my card is not generating the…
1
vote
0 answers

State machine lagging unexplicably

The code below represents a blood-level meter made with arduino with 5 different states: Standby, and showing water, sugar, caffeine or alcohol-level. Most of the time it works well, but sometimes it starts lagging a lot, and the touch sensor that…
1
vote
3 answers

Notify userland from a kernel module

I'm implementing a kernel module that drives GPIOs. I offer the possibility for the userland to perform actions on it via ioctls, but I'd like to get deeper and set up a "notification" system, where the kernel module will contact directly userland…
1
vote
0 answers

Stopping a long python function in tkinter

I am commanding a couple devices over serial from a tkinter based GUI, and generally I just want a long process of making sure all the equipment is healthy to run by itself. But occasionally if I see something strange while this process is running I…
clifgray
  • 4,313
  • 11
  • 67
  • 116
1
vote
0 answers

Unreachable catch block for InterruptedException and Class.newInstance()

In a current project, I am attempting to load a set of plugins; The problem is that plugin could do anything, include throwing exceptions, or just hanging forever. I am trying to accomplish the following: try { // load class by package name …
1
vote
0 answers

Chrome API to handle "onHang" tab event

On Chrome, when a webpage hangs, Chrome will perform a "Pages Unresponsive" interrupt: Are there ways to "hook" into this interrupt handler, such that I can run a custom piece of script when a webpage hangs? What is needed to achieve this?
Pacerier
  • 86,231
  • 106
  • 366
  • 634