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
3
votes
0 answers

Linux kernel UART interrupt

I'm trying to get an interrupt whenever the UART line gets data on the BeagleBone Black. However, I'm stuck on figuring out how to register the handler. I can use request_irq() to register GPIO interrupts for example, but trying to get the irq for…
Iluvatar
  • 1,537
  • 12
  • 13
3
votes
0 answers

When is a Python program not responding to interrupts?

I have a Python3 daemon process running on Linux. It is a normal single thread process running in the background and doing select.select() in the main loop and then handling I/O. Sometimes (approx. 1 or 2 times in a month) it stops responding. When…
VPfB
  • 14,927
  • 6
  • 41
  • 75
3
votes
3 answers

What happens if I disable an interrupt inside of its ISR?

What happens if you disable an interrupt inside that interrupt's ISR? For example, if I am transmitting data over USART from a buffer and that buffer runs out of data then I want to stop transmitting temporarily, so after sending the last byte in…
John Moffitt
  • 5,730
  • 7
  • 30
  • 39
3
votes
1 answer

Interrupts within a class

I am trying to write a library to calculate the PWM duty period using interrupts. I understand a class member is not the right format of function for attachInterrupt. However, I have tried to follow this post Calling an ISR from a class by Nick…
Shaun Barney
  • 718
  • 10
  • 24
3
votes
2 answers

ARM GIC Interrupt starvation

Not sure if there are similar questions. I tried to backread but can't find any, so here it is. In my bare-metal application that uses ARM Cortex-A9 (dual core with GIC), some of the interrupt sources are 4 FPGA interrupts (let's say IRQ ID 58, 59,…
ubermensch
  • 363
  • 2
  • 12
3
votes
2 answers

what does mean by __even_in_range(UCA0IV,0x08)

I found this part from the example code for UART for MSP430FR57xx from TI. I don't understand what __even_in_range(UCA0IV,0x08) does mean? #pragma vector=USCI_A0_VECTOR __interrupt void USCI_A0_ISR(void) { switch(__even_in_range(UCA0IV,0x08)) …
3
votes
1 answer

STM32 Interrupt Handeling if condition

How I could have 2 interrupts with one handler by this code below: SYSCFG->EXTICR[0] |= SYSCFG_EXTICR1_EXTI0_PB | SYSCFG_EXTICR1_EXTI1_PC; EXTI->IMR = EXTI_IMR_MR0 | EXTI_IMR_MR1; EXTI->RTSR = EXTI_RTSR_TR0| EXTI_RTSR_TR1; /* Configure NVIC for…
Sandeerius
  • 377
  • 2
  • 7
  • 15
3
votes
1 answer

How to pin a interrupt to a CPU in driver

Is it possible to pin a softirq, or any other bottom half to a processor. I have a doubt that this could be done from within a softirq code. But then inside a driver is it possible to pin a particular IRQ to a core.
3
votes
1 answer

Real mode Interrupt handling routine not working as expected

I managed to load a small kernel into memory via a bootloader that performs a far jump to 0x0090:0x0000. The kernel is loaded successfully as I print a character from there to test it and it works properly. I wanted to remap interrupts 0x08->0x0F…
Matthew
  • 268
  • 1
  • 11
3
votes
2 answers

Is returning while holding a spinlock automatically unsafe?

The venerated book Linux Driver Development says that The flags argument passed to spin_unlock_irqrestore must be the same variable passed to spin_lock_irqsave. You must also call spin_lock_irqsave and spin_unlock_irqrestore in the same function;…
Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
3
votes
2 answers

Determining port inside the GPIO EXTI Handler

How to determine the port from which the interrupt has been generated in the handler? For example, in the EXTI0_IRQHandler how will I determine whether the interrupt was generated through PA0, PB0 or PC0? Is it even possible to handle interrupts…
Nikhil Gupta
  • 172
  • 1
  • 18
3
votes
2 answers

Inherent race condition in Linux IRQ handlers

Suppose there is an port-mapped I/O device which arbitrarily generates interrupts on an IRQ line. The device's pending interrupts may be cleared via a single outb call to a particular register. Furthermore, suppose the follow interrupt handler is…
Vilhelm Gray
  • 11,516
  • 10
  • 61
  • 114
3
votes
1 answer

Why can't I return from certain processor exceptions? Toy kernel dev

I have implemented a way to register callback functions to interrupts in my kernel that I am developing from scratch. This means if a program runs int 0x67 it will call a C function in my kernel to handle a system call. It returns like it should and…
Michael Morrow
  • 403
  • 2
  • 16
3
votes
1 answer

Bare-Metal Interrupt Handling on Lego Mindstorm EV3 (TexasInstruments Sitara AM1808 SoC)

For a university project, our project teams wants to write a bare-metal operating system for the Lego Mindstorm EV3 plattform. We encountered a problem regarding the interrupt handling which we were unable to solve, although we did a lot of research…
3
votes
0 answers

UIO Drivers - switching to kernel Interrupt

I was going through the userspace input output drivers that eliminates the drawback of kernel crashing due to the inapproriate functioning of the driver code. If kernel has scheduled a process1 and if the process1 is already running in the CPU,…
Angus
  • 12,133
  • 29
  • 96
  • 151