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
2 answers

STM32F0 exit from STOP on SPI receive interrupt

Am I correct in assuming that it's not possible to exit from STOP mode on SPI receive interrupt, because all the clocks are stopped?
OXO
  • 61
  • 4
  • 14
1
vote
1 answer

STM32F0 SPI receive interrupt not firing

I have a simple project, created using CubeMX for the peripheral initialisation. SPI is in slave mode, and appears to be initialised correctly, but when I clock 8 bits of data, the interrupt doesn't get called. Here's the code /* SPI1 init function…
OXO
  • 61
  • 4
  • 14
1
vote
1 answer

Two I/O blocked processes in OS and a keystroke event

Consider the following case in a multicore CPU and for simplicity lets stick to linux kernel. wait_char() { while (1) { ch = readchar(); putchar(ch); } } I open two terminals A and B and run the wait_char() code in…
visweshn92
  • 301
  • 1
  • 3
  • 13
1
vote
1 answer

Distributed interrupts

I'm just looking for info on how the os handles interrupts in a distributed environment.
1
vote
3 answers

Timer interrupt in x86 Assembly

I am trying to write a procedure that will stop the execution for n*55ms by using the INT 08h, but I haven't been able to find anything useful so far. How do I use this interrupt?
Konrad Nosal
  • 51
  • 1
  • 3
1
vote
3 answers

C++ Interrupt or Cancel getch();

I have a simple timer. It's in a function running in a thread separate from the main. Using std::future, the function returns a simple bool that says whether the timer has hit a specific number or not. I am using getch(); to see if the user pressed…
user7327796
  • 11
  • 1
  • 3
1
vote
1 answer

Could ticker interrupts interfere with hardware interrupts?

Background I was wondering if using ticker interrupts could interfere with hardware interrupts triggered by a button press. Example Imagine I would like to use these two types of interrupts: a ticker timer to update a progress bar on a small…
pfabri
  • 885
  • 1
  • 9
  • 25
1
vote
1 answer

How to resolve INSTALL_FAILED_MISSING_SHARED_LIBRARY on Android Things Project

I try to control a GPIO Port on Android App using the Android Things Project. But when I run this app through ADB(on Android Studio), the following message is issued.. Installation failed with message INSTALL_FAILED_MISSING_SHARED_LIBRARY. It is…
andy
  • 107
  • 3
  • 12
1
vote
0 answers

How to handle an interrupt from the GPIO Expander(PCA953X)

I use a GPIO Expander like PCA9575. But I don't know how to handle an interrupt from the expander.. From the gpio-pca953x.c, the following code is the ISR for the expander. static irqreturn_t pca953x_irq_handler(int irq, void *devid) { struct…
andy
  • 107
  • 3
  • 12
1
vote
1 answer

Does poll/epoll handling is in interrupt context?

This is probably trivial question for some people, but somehow I'm not sure about it. When waiting with poll for event from kernel, is it that the handling of new event is done in interrupt context ? If not, does it mean we can sleep/wait (using…
ransh
  • 1,589
  • 4
  • 30
  • 56
1
vote
2 answers

Get system time with BIOS interrupt in assembly

I want to get the time(hours, minutes, second) with the interrupt INT 1Ah/AH = 00h. I know that it keeps in CX the High-order part of clock count and in DX the Low-order part of clock count. I searched about it, and found the…
Tom
  • 171
  • 1
  • 3
  • 14
1
vote
3 answers

How can I end an infinite loop with socket operations inside after finishing current iteration?

I have an infinite loop in which there are operations that are mandatory to be completely executed before exiting the loop. Namely, I am using the socket library for connecting to an external device and I need to wait the read instructions to be…
Jalo
  • 1,131
  • 1
  • 12
  • 28
1
vote
0 answers

How does the CPU handle interrupts while playing audio?

When a CPU "multitasks" it is rapidly switching between the threads of various processes to simulate processing which looks like true parallel. When you have too many interrupts while running a program, you may not notice a difference in the…
Kunal Chopra
  • 219
  • 3
  • 8
1
vote
1 answer

Configure FreeRTOS ISR stack size

Is there a separate stack for FreeRTOS ISR context ? Is it fixed or configurable ? #define configMINIMAL_STACK_SIZE ( ( unsigned short ) 256 ) #define configTOTAL_HEAP_SIZE ( ( size_t ) ( 512 * 1024 ) ) From my understanding this…
RohitMat
  • 145
  • 1
  • 14
1
vote
1 answer

Bottom Halves on FreeRTOS?

I have heard about deferred interrupts in FreeRTOS, but as per my understanding, the task to which the ISR switches in order to do the necessary work runs in the task/process context. Is there a scheme similar such as tasklets or softirq where in…