Questions tagged [interrupts]

A mechanism for the control of program flow in a computer. When interrupted a computer saves it's present operational state and changes to execution of code that is dependent upon which interrupt was generated. Interrupts can be either hardware-sourced or software-sourced; software-sourced interrupts are called traps. It is an alternate mechanism to polling and is the basis around which most I/O, multitasking and control is implemented.

Filter by
Sorted by
Tagged with
2 votes
1 answer
35 views

MCP23017 open drain interrupts not working as expected

I have multiple MCP23017 ICs with their interrupts all connected in serial. The interrupt pins are configured to be open-drain. All the A port interrupt pins are connected together and all the B port ...
user avatar
  • 23
1 vote
1 answer
74 views

Simple AVR interrupts in C - How to cleanly stop and restart "INT0"?

I'm trying to use an ATTiny84's INT0 pin to detect a falling edge event on a 1 kHz signal. What is the correct way to temporarily halt this interrupt INT0, and then resuming it at a later time, ...
user avatar
0 votes
0 answers
7 views

How to use two timers 1 and 4 simultaneously in arduino mega 2560 [migrated]

I activated timer 1 and its interrupt on the 2560 board and it works properly.Now I want to run Timer 4 as well. I installed the Timer 4 library, but when I compile the program, I get the following ...
user avatar
  • 1
1 vote
0 answers
46 views

STM32L562 interrupts not working

I'm programming an STM32L562 (self made PCB), and when i try to init a TIM16 interrupt, HAL_TIM_Base_Start_IT(&htim16); using this function, it get stuck at ...
user avatar
  • 11
0 votes
0 answers
46 views

Do PCI Express devices' interrupts always go through a PIC or an APIC?

My Question is PCI/PCIe interrupt path to CPU is through a PIC or an APIC? https://people.freebsd.org/~jhb/papers/bsdcan/2007/...
user avatar
  • 83
1 vote
0 answers
41 views

Does the external hardware interrupt affect both cores in ESP32?

I am working on a project, where I am implementing FreeRTOS on an ESP32 DEVKIT-V1 module. One core is specifically dedicated to reading high precision rotary encoders. I am reading the number of ...
user avatar
  • 83
0 votes
0 answers
12 views

Determine BRK Input State or Generating Interrupt on BRK in STM32G0 Timer 1 (STMCUBE IDE, HAL)

I am using an external BRK input for TIM1. I want to count how many BRK events occurred. I have tried callbacks unsuccessfully. Maybe I am not able to understand how to apply them. Tried reading HAL ...
user avatar
0 votes
2 answers
55 views

How can I handle Overrun and Framing errors in UART transmissions on PIC16 devices?

I am transmitting and receiving data over UART between two PIC16 devices using interrupts, but at random times, one of them seems to block its receiver and it stays stuck in that position permanently. ...
user avatar
  • 55
-1 votes
3 answers
90 views

Simple circuit to sample 120 VAC and yield 8.33 ms pulses

Have you noticed the lack of availability and prices of RTC chips lately? A simple DS1307 RTC is simply not available right now. Last year I purchased DS1307s for less than a buck. Now they are $4+ ...
user avatar
  • 319
-1 votes
2 answers
123 views

STM32: How can i poll a GPIO pin until 100ms using timer interrupt?

I am currently use nucleo-board and I try to poll a pin until 100ms. I activated timer interrupt. So basically if pin is not high (digital '1') until 100ms the function must returns false. I share my ...
user avatar
2 votes
4 answers
143 views

Interrupts in microprocessors

This might be a very trivial question, but I was unable to find a concise answer to it. For non maskable interrupts, are the interrupts handled immediately while the current instruction is getting ...
user avatar
  • 31
2 votes
0 answers
106 views

STM32 Software Interrupt Trigger Any

STM32F746-Disco Windows 10 STM32CubeIDE 1.8.0 I've just finished writing my first minimal bare metal UART DMA driver (CMSIS only), and both reception and transmission work ok, but then I thought I ...
user avatar
  • 3,286
0 votes
1 answer
79 views

PIC18 UART interrupt priority problems

I am completely new to microcontroller programing. Just started my journey with PIC18F24K22 and now I am on the UART interrupt stage. I have been reading the datasheet meticulously and it really took ...
user avatar
2 votes
1 answer
184 views

Why to clear the interrupt flag before the user callback function?

In a tutorial, regarding the following IRQ Handler function: ...
user avatar
  • 1,213
0 votes
1 answer
105 views

STM32 USART Does Interrupt Trigger if TXE was set before TXEIE

STM32F746 Disco, STM32CubeIDE 1.7.0, Win 10, CMSIS-only, C language, on registers. I'm writing a UART transmit driver on interrupts (load data into buffer array, automatically fetch it from there with ...
user avatar
  • 3,286
1 vote
0 answers
50 views

Cannot access array after coming back from a function which execute with Interrupts STM32 Cube IDE

Hi I am using STM32 Cube IDE to Program Neucleo F746zg board. In my code there is a function to check if the elements of an array is equal to some value and if it is I execute some Functions. I first ...
user avatar
1 vote
1 answer
81 views

Change Notification Interrupts PIC32

I am attempting to code a program in the PIC32 where pressing S1 button lights up the LED and releasing it would turn it off, LED2 is also blinking - using interrupts. The pressing and releasing works,...
user avatar
-1 votes
3 answers
168 views

How to read multiple quadrature encoders using an Arduino

I am developing a 4-wheel mobile robot. Each motor has a quadrature encoder with 2000 pulses per revolution (PPR). I have tried to read the encoders' pulses using an interrupt, but the counted values ...
user avatar
8 votes
1 answer
235 views

Writing bytes to internal flash memory blocks all interrupts on the STM32L0 despite moving the vector table and ISR functions to RAM

The Context I have a embedded system running on an STM32L053 processor that needs to process STM32 hardware timer interrupts regularly and cannot be disabled. These top-priority interrupts cannot be ...
user avatar
  • 347
1 vote
1 answer
56 views

PIC18, XC8 compiler, enable multiple interupts

I am trying to make a module that needs to communicate over USART module, and also, do some tasks on a timer basis. (1ms / 30sec / 2 minutes) Now I need to enable USART interrupt and enable a 1ms ...
user avatar
0 votes
2 answers
144 views

Why is my interrupt so slow/inconsistent? Arduino external interrupt as pedestrian crossing button

So this is the setup; It's a traffic light system with 2 road lights and a pedestrian crossing. The normal sequence is alternating between main road green and secondary road green. It reads these ...
user avatar
0 votes
0 answers
95 views

Spi in interrupt mode for transmission and reception in PIC microcontroller

I am using spi in pic16f877a, for m95320 eeprom. Using interrupt for communication, Everything is working fine. However I have to tweak something which is confusing me, of using interrupt. ...
user avatar
  • 229
0 votes
2 answers
80 views

Transmission interrupt in PIC18F46K80

I'm using a PIC18F46K80 and have been trying to send data to the computer using USART module (simulating in Proteus). This is my code: ...
user avatar
  • 120
0 votes
1 answer
35 views

How decide which pin right for interrupts?

I would like to ask about I2C sensor's interrupt pins connection to STM32F. I use ADXL345 Ggyro sensor. I would like to connect sensor to STM32F446RE (64 LQFP). But I do not know what I need to know ...
user avatar
  • 89
1 vote
0 answers
129 views

STM8: How to make External Interrupt Handler firing only once

I have a external interrupt handler which is tied to a button which will be fired upon pressed. ...
user avatar
0 votes
1 answer
95 views

Faster Timer0 overflow than 2 ms on Attiny85

I'm trying to get a Timer0 overflow with an overflow every 500us, but can't find a solution to get it so low. I'm running the Attiny85 on its internal 1 MHz clock, so I know it is not gonna be the ...
user avatar
  • 309
2 votes
1 answer
100 views

PL011 clear interrupt when interrupt condition is true

PL011 seems to have a level triggered interrupt system, meaning, when certain criteria (e.g. enough space in TX buffer) is true, the interrupt line will be asserted. It is confusing how this interacts ...
user avatar
1 vote
0 answers
61 views

PIC Microcontroller C program Problem.[Sequential Issue and PWM Problem]

I have just started coding PIC microcontroller in C and do not understand where the problem is. PIC10F320 is chosen for its two PWM pins, one for breathing effect on LED and the other one for 75% duty ...
user avatar
  • 13
2 votes
2 answers
89 views

8051 interrupt within interrupt high vs low priority

I am learning and experimenting on the 8051 (AT89C51). From what I have learnt so far regarding interrupts, I understand that an interrupt with a higher priority can interrupt an interrupt with a ...
user avatar
  • 49
0 votes
0 answers
932 views

How to receive UART0 data using UART0 Received interrupt in ESP32 with Arduino IDE code

I want to receive UART0 data of ESP32 using UART0 Received Interrupt using Arduino IDE. There have arduino Library to receive UART data like: ...
user avatar
-1 votes
2 answers
199 views

How does programmed IO vs interrupt driven IO work? [closed]

I know how programmed IO and interrupt driven IO work but I am confused if I am right about their working or not: This is the flowchart given in this site: https://slideplayer.com/slide/265620/ I used ...
user avatar
  • 23
0 votes
1 answer
160 views

MSP430 UART Trouble

I'm trying to learn how to use UART on a MSP430G2553 and I wrote this simple program. The program should set up a timer interrupt to happen once a second. The interrupt service routine should toggle a ...
user avatar
  • 31
0 votes
0 answers
341 views

How to update period of a timer every interrupt on stm32 with preload enabled?

I'd like to change timer period inside interrupt handler that is equivalent to AVR code ISR(TIMER0_COMP_vect){ OCR0 == new_value } As I undestand the documentation,...
user avatar
  • 101
0 votes
1 answer
125 views

MSP430 Timer Interrupt Not Happening

I recently starting learning how to program a MSP430 and thought I'd start by writing a program to turn a LED on and off every second. However, when I run my code the LED goes on an stays on. When I ...
user avatar
  • 31
0 votes
2 answers
54 views

Can a pin change value after causing interrupt on a MCU

This was just a question I thought of as I started working through a design project. Let's say I have a hall effect sensor on an encoder motor. I need to catch every pulse from this encoder so I use ...
user avatar
  • 39
0 votes
2 answers
125 views

STM32 interrupt triggers by itself

I am using stm32cubeide to program a stm32f030f4p6 MC. I have assigned one pin as an external interrupt and it is connected to the data output of an RF433 receiver. Here is a summary of my code: ...
user avatar
0 votes
1 answer
386 views

Trying to use I2C ITs with HAL Functions

Hardware : STM32L452RET6 Software : STM32CubeFW_L4 v1.17 My problem : After using I2C with standard polling functions, i would like to use IT Functions to optimize my firmware. I try to work with ...
user avatar
  • 159
0 votes
1 answer
115 views

ATtiny85 - Sleep Mode & Interrupts

I am working with ATtiny85. I want to put my MCU in IDLE Sleep mode and after every five minutes, I want to write data into EEPROM. I am using Timer 0 overflow interrupt to count 5 mins. Counting will ...
user avatar
  • 5
1 vote
1 answer
740 views

STM32 UART interrupt with callback not working

I am trying to make a small project with an STM32 which uses serial commands to control the rotation direction of a motor. I used UART interrupts and callbacks to try to achieve that. I am using an ...
user avatar
  • 191
11 votes
10 answers
3k views

Is there a microcontroller with zero interrupt jitter?

I know that interrupt latency depends on what the CPU is doing when the interrupt takes place (arm interrupt latency guide). This effect is called interrupt jitter. For my application I need an MCU ...
user avatar
0 votes
1 answer
94 views

Cortex-M4 how to recover from vector table read fault in an empty device?

I have to load and run firmware in RAM of an empty Cortex-M4 chip (in a manufacturing environment). The chip ordinarily expects vector table at address 0x0 in flash. When I am loading my firmware to ...
user avatar
  • 8,416
0 votes
0 answers
69 views

AVR: Interrupts from sleep not working properly

I am trying to program a piece of code (on an ATMEGA4809-nano) which creates an interrupt when a button is pressed or released. I have implemented it, but for some reason the interrupts aren't working ...
user avatar
0 votes
0 answers
108 views

HAL_Delay fails after flashing code

My code runs differently if reset vs. power-cycle. My board has a status LED. My program flashes an LED on and off. When I flash my code via my STLink V2 and hit my reset button, the light turns on, ...
user avatar
0 votes
0 answers
41 views

How to implement a touch controller wake up circuit?

I have an system-on-module (SoM) connected to an LCD with touchscreen interface. The SoM allows wake up from sleep by toggling one of its GPIOs. These are the datasheets: LCD, touch controller and SoM....
user avatar
1 vote
4 answers
262 views

Removing noise from the speed sensor of a motorcycle

I am trying to make a digital dashboard for a motorcycle using a Raspberry Pi, a display and some sensors. I am using this speed sensor. When I put the sensor on the axis of the motor wheel and run ...
user avatar
  • 111
2 votes
2 answers
176 views

Generate an interrupt with 8 inputs

I have 8 TTP223 touch sensors for 8 relays. I want my microcontroller to know when anyone of the switches is high or low. For that I can take inputs from the same pins that switch relays. However, how ...
user avatar
0 votes
0 answers
36 views

Is it possible to determine if a breakpoint is hit during an interrupt?

I'm composing some GDB commands to make it behave like a "print()" function: ...
user avatar
  • 1,204
1 vote
2 answers
256 views

How do interrupts work in embedded systems? I need a general view

I am trying to understand interrupts in embedded systems. Please correct me where I am wrong. Below is my understanding. This could help me and other who are trying to understand interrupts. ...
user avatar
  • 31
0 votes
1 answer
172 views

Can a Triac be driven using only positive voltage due to the laws of Q1 and Q4 quadrants?

I have a BTA12-600B Triac and an Arduino. Is it possible I can trigger both positive and negative amplitudes of an AC cycle by suppling only a positive voltage from the Arduino digital pin to the ...
user avatar
  • 1
0 votes
2 answers
299 views

How to exit from an interrupt's loop for MSP430

I'm new to MSP430 and microcontrollers. Right now I'm learning interrupt routines and trying to write a program that changes the LED's state (OFF-ON-BLINK) by every press on P1.1 button. I have used ...
user avatar
  • 13

1
2 3 4 5
16