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

Is there any formal specification (possibly by Intel) for a list of interrupts available in x86?

For example, in order to print a character to the console in real mode, we should set al to a desired character, and ah to 0x0e, specify 0x10 as a interrupt vector. Although there's a site dedicated to this (such as Ralf Brown's Interrupt List), I…
1
vote
1 answer

Arduino UNO with LCD, strange readings from rotary encoder

I have an I2C 16x2 LCD display connected to an Arduino Uno's A4 (SDA) and A5 (SCL) pins. No problem with the display, it works properly. Then I have a rotary encoder connected to pins D3 (INT1) and D4. The INT1 pin is used as interrupt to read the…
darx
  • 1,417
  • 1
  • 11
  • 25
1
vote
1 answer

Overrun in ST32 HAL SPI slave interrupt

I have a difficulty with ST32F030 and Slave SPI I'm trying to have it respond to an spi command:- Master sends 0x05, slave responds with an array of 7 bytes. It kind of works the first time, but then loses sync, and get OVR bit set. I can't figure…
OXO
  • 61
  • 4
  • 14
1
vote
0 answers

arm cortex-m4 hardfault when using -ffast-math

I'm trying to launch simple LED blinking application, all works fine but if I add -ffast-math, it goes to hard fault. I debugged via GDB and found that if I add -ffast-math, it inserts call to __arm_set_fast_math from __libc_init_array as part of…
Zhani Baramidze
  • 1,407
  • 1
  • 13
  • 32
1
vote
1 answer

Can an Interrupt handler write to a FIFO

I have a thread that is waiting for events received on a FIFO. Most of events are configuration events send from another thread in the same process. I would like the thread also to be able to handle interrupt events by having the interrupt handler…
user357498
  • 139
  • 3
  • 5
1
vote
1 answer

STM32 HAL SPI Interrupt Handling

Im using the STM32F4xx and want to learn to programm with the ST-HAL. In the moment I try to send/ receive SPI over interrupts. I used the following functions to receive data over INT.: Init function: void HAL_MspInit(void) { /* USER CODE BEGIN…
TangoOne
  • 41
  • 1
  • 2
  • 7
1
vote
1 answer

STM32F412 using FreeRTOS and USB to do audio processing

I am using stm32f4 nucleuo board. I can transmit the audio data through usb to PC without FreeRTOS. Now I want to learn how to integrate the FreeRTOS and usb together. But I have some questions about how fundamentally threads and ISR interact with…
Lion Lai
  • 1,862
  • 2
  • 20
  • 41
1
vote
0 answers

VESA / int86 functions in mingw (cross-dev)

Before anyone tells me that in86 and VESA is a dos thing and it will not work on modern system. I know, I'm working on a game that works both on old and new systems. My game works on windows 9x with SDL1, but it's very slow (166Mhz, 640x480@256…
1
vote
0 answers

PS-PL GPIO Interrupt using FreeRTOS

I am working on CORTEX-A9 FreeRTOS port using ZEDBoard. I want to take PS-GPIO interrupt. But I am facing following issues here.. When an interrupt occur, GPIO handler calls two times... When I set interrupt on rising or falling edge, Corresponding…
User9211
  • 11
  • 1
1
vote
1 answer

STM32F0: Interrupt on EXTI1 / EXTI2 not firing, while EXTI4 is working. *confused*

can you please help me out here and tell me what I am doing wrong? EXTI1 and EXTI2 will not fire, while EXTI4 is however working flawlessly. It's not the hardware. If I switch the pins, the new EXTI4 button will keep firing, while the button that I…
1
vote
1 answer

Microchip Harmony timing issues on PIC32MZ

I am using MPLABX + Harmony framework to write code for a PIC32MZ1024EFK064. My goal is, to trigger the ISR every microsecond. In order to test this, I toggle a LED after 1000000 cycles of the ISR: uint32_t xxx = 0; void __ISR(_TIMER_2_VECTOR,…
Oliver
  • 31
  • 7
1
vote
0 answers

How to get mouse movement and left/right click in dos

after some reading, I understand that 116 handler should be used for the mouse, after using it, only left/right click of the mouse works, but when I move the mouse, the interrupt does not happen. how can I get mouse's movement? Here's what I've done…
Ilan Aizelman WS
  • 1,630
  • 2
  • 21
  • 44
1
vote
3 answers

stm32 - Interrupt handle

In external interrupt function, I want to reset by calling main function. But afterwards, if I have a new interrupt trigger, MCU thinks that It's handling in interrupt function and It doesn't call interrupt function again. What is my solution? (in…
1
vote
1 answer

Systick timer interrupt doesn't work on TM4C123

I am new here and hoping to help and be helped. My question is about systick interrupts on a tm4c123gh6pm m4 processor. When I use systick as timer (disable interrupt) it works properly, but when I enable interrupt, as the systick counter reaches…
Furkan
  • 11
  • 2
1
vote
1 answer

Arduino Is it ok for an interrupt function to call another function?

I am working on an Arduino project where I receive messages trough I2C communication. I have a couple of routines that the program spends a lot of time in them without returning. Currently, I set an interrupt flag when an interrupt occurs and I…
Saik
  • 993
  • 1
  • 16
  • 40