Questions tagged [interrupt-handling]

The concept of handling system interrupts in an application or embedded system.

The concept of handling system interrupts in an application.

This tag may also refer to an operating-system-specific way of handling interrupts, or interrupt handling in a specific type of microcontroller or processor.

Use this tag only if you have reason to believe that your issue is directly related to interrupt handling. Do not use this tag if your application is using interrupt handling, but interrupt handling does not cause the issue your are asking about.

828 questions
7
votes
5 answers

Interrupting a thread that waits on a blocking action?

I am running a thread whose main action is to call on a proxy using a blocking function , and wait for it to give it something. I've used the known pattern of a volatile boolean and the Interruption , but I'm not sure it will work: When I tried to…
Yossale
  • 14,165
  • 22
  • 82
  • 109
6
votes
4 answers

Real Mode, Interrupt vector replacement Crashing

I'm trying to learn more about how systems really work underneath all the pretty graphics on top. So I'm currently playing with memory in the 512bytes that the BIOS loads on startup, can't really call it a bootloader at the moment I guess. Anyway,…
Dave
  • 698
  • 4
  • 12
6
votes
1 answer

GD32VF103 Longan Nano interrupts not working

Introduction: I bought a Longan Nano evaluation board equipped with a GD32VF103 Risc-V MCU. I can run the video player demo, and compile and load working code using VS Code, PlatformIO and the DFU tool. Below a video of the board and the demo…
6
votes
1 answer

Why do I get triple fault when trying to handle an exception on 286 but not on a modern CPU nor Bochs?

I'm trying to initialize protected mode with exception handling on an AMD 286 system. I've debugged the code below on Bochs, and it works fine there. So does it when run on a Pentium 4 machine. But on the 286 it simply triple faults when it gets to…
Ruslan
  • 18,162
  • 8
  • 67
  • 136
6
votes
1 answer

How to load IDT?

I'm working on writing own little os. I already done booting, entering protected mode, some text printing and serial communication with qemu. I've been trying to add interrupts for over two days. I was looking everywhere including other systems…
Hexagonale
  • 150
  • 9
6
votes
1 answer

STM32 HAL timer interrupt isn't triggered

I'm trying to periodically send and Serial string from my STM32F746ZG device, using an interrupt. Most of the code is auto generated by stm32cubemx. I have hardware breakpoints (jlink) set at each interrupt but I only enter the period elapse…
Jelle Spijker
  • 183
  • 1
  • 1
  • 8
6
votes
0 answers

Intel Local APIC Spurious Interrupt

I'm developing now a code snippet that should enable\disable local APIC. I've seen in the Intel manual that I have to set a spurious interrupt vector prior to enabling LoAPIC. In the Intel Manual I see the following explanation: A special…
RRR
  • 3,937
  • 13
  • 51
  • 75
6
votes
0 answers

How to interrupt a Django Management Command

I overrode BaseCommand to create my own management command, as documented here. It's a long-running process though, and I want to be able to interrupt it and have it gracefully shut down when I send it ctrl+c. I tried the usual…
frank
  • 1,322
  • 1
  • 10
  • 28
6
votes
2 answers

Does an interrupt handler have to be reentrant?

I'm using a static variable inside an interrupt handler, making the interrupt handler non-reentrant. Is it OK to have a non-reentrant interrupt handler? When a hardware interrupt is raised, does the event go in some sort of a queue and wait for…
Arash Fotouhi
  • 1,933
  • 2
  • 22
  • 43
6
votes
3 answers

Are there any kernel tools available to measure interrupt latency with reasonable accuracy?

I am trying to measure the jitter in the Interrupt latency for variousLinux kernel ( with RT patch enabled etc). I know the best way is to use a oscilloscope to do this, by generating a interrupt with GPIO pin and toggling another GPIO pin in the…
Nuetrino
  • 1,099
  • 1
  • 14
  • 32
6
votes
2 answers

tasklet, taskqueue, work-queue -- which to use?

I am going through ldd3 for last few months. I read first few chapters many times. These two links are using diffrent way, one is using work queue other is using task-queue. To implement a bottom…
6
votes
1 answer

ARM Interrupt Handling in QEMU

I'm trying to understand how QEMU handles interrupts for ARM processors. I have a bare metal binary blob (ie, not linux -- just some assembly code) which was built for a ARM1176. When run in QEMU, during initialisation the code in the binary blob…
user2071017
  • 63
  • 1
  • 4
5
votes
2 answers

I2C slave receiver on stm32f4

I try to implement a i2c slave receiver interrupt service routine on a stm32f4. Here is my smart piece of code. void I2C2_EV_IRQHandler() { switch (I2C_GetLastEvent(I2C2)) { //The address sent by the master matches the own address of…
Jonny Schubert
  • 1,393
  • 2
  • 18
  • 39
5
votes
4 answers

Vectored interrupts

What is the difference between vectored and non vectored interrupts? I thought all interrupts had to be vectored interrupts... After all don't all interrupts have a vector number and thus a vector with a specific ISR [interrupt service routine] …
rrazd
  • 1,741
  • 2
  • 32
  • 47
5
votes
1 answer

Kinds of IPI for x86 architecture in Linux

I would like to know what are the different kinds of IPIs available for x86_64 in Linux. In particular, I want to find out the different interrupts handlers for IPI interrupts. In Understanding the Linux Kernel, 3rd Edition by Daniel P. Bovet,…