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
0
votes
2answers
41 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 ...
0
votes
2answers
85 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: ...
0
votes
1answer
54 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 ...
0
votes
1answer
43 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 ...
1
vote
1answer
50 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 ...
11
votes
10answers
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 ...
0
votes
1answer
55 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 ...
0
votes
0answers
41 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 ...
0
votes
0answers
59 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, ...
0
votes
0answers
39 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....
1
vote
4answers
156 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 ...
2
votes
2answers
115 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 ...
0
votes
0answers
30 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: ...
1
vote
2answers
169 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. ...
0
votes
1answer
69 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 ...
0
votes
2answers
108 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 ...
1
vote
0answers
38 views

IRQB on W65C22 unstable

I am following the YouTube tutorials by Ben Eater to build a 6502 computer (https://www.youtube.com/playlist?list=PLowKtXNTBypFbtuVMUVXNR0z1mu7dp7eH). I got everything to work until the part with the ...
1
vote
2answers
170 views

hal_delay in external interrupt problem

I wrote a simple C program for STM32: main.c ...
0
votes
2answers
73 views

SPI communication with MLX75306 optical sensor array

I am having some trouble talking to an optical sensor array with SPI (MLX75306, data sheet). I am using an Arduino Nano Every. I am not familiar with SPI communication and I have the feeling I am ...
0
votes
1answer
64 views

External interrupt debugging with PIC16F877A

I am working with a PIC16F877A on a simulator on MPLABX 5.35 with XC8 compiler ver 2.32. I am trying to understand and work with the external interrupt, I am facing a few issues while debugging. ...
0
votes
3answers
121 views

Getting glitches on GPIO using a MOSFET as a logic level converter

I need to connect an Event Detection pin (pin of the NXP NTAG 5 component) to a GPIO of the NXP i.XM6 processor. The problem is that the NTAG 5 pin has a logic level of 5V and the GPIO has a logic ...
0
votes
0answers
61 views

STM32 using trigger to start timer

i want to use a Timer which generates a 40kHz frequency to toggle an output, when a start trigger arrived on an input. After a high signal was detectet on that input, the GPIO should be toggled 20 ...
0
votes
2answers
195 views

STM32 interrupt and input on same pin

Fairly simple question but I couldn't find any instructions on this. I'm using an STM32G070 I'm interfacing with an ADS1231 which uses DOUT / ~DRDY on the same pin, and I'm wondering if there is a way ...
0
votes
0answers
79 views

STM32 uart interrupt not firing

After having a UART echo working on my nucleo F446ze, I am trying to get UART interrupts working. I thought all I had to do is : set the priority for the UART3 interrupt enable the USART3_IRQn ...
0
votes
1answer
26 views

Problem or misunderstand of ADATE bit on ATTiny45

I have 2 buttons connected to pulled-down ADC input. I want to trigger ISR(SIG_ADC) when ADC finishes conversion - this is working. If I start ADC using ...
1
vote
1answer
45 views

Electrostatic causing interrupt trigger [closed]

I am using Atmega328P in sleep mode and for wakeup I am triggering interrupt with push buttons. Circuit working completely fine. PCB is surrounded by aluminum cylindrical body. Problem is when someone ...
0
votes
2answers
156 views

MSP430: How to change variables in in interrupt service routine when waking up from LPM?

I am using an MSP430FR2433 with the development board from TI and want to use its low power mode 3.5 so that I can wake it up from a GPIO pin or the RTC. I am using one of the LPM3.5 example codes in ...
0
votes
1answer
72 views

Combining interrupts and debouncing on a keypad

I would like to interrupt a program when a key is pressed on a keypad, and figure out which key has been pressed. I do not care much for ghosting effects, this is supposed to be operated with one ...
0
votes
0answers
36 views

Interrupt trigger on presence of a pwm signal

In order to detect the presence of a pwm signal using a microcontroller from an external sensor (an interrupt), say the sensor is a hall sensor rotary encoder that is used to count the number of ...
0
votes
0answers
47 views

stm32 keil cannot assign array in interrupt

I can not assign my array in interrupt. My main.c function is like this: ...
2
votes
2answers
219 views

PCI express devices are required to support MSI: what does that mean?

I am a bit confused concerning an issue I had with a PCI Express (PCIe) card used to interface serial device on a Linux computer. The card is based on the XR17V354 chip from MaxLinear. From the ...
3
votes
5answers
210 views

How can I debounce a switch on both positive and negative-going edges?

I would like to connect a mechanical switch to an interrupt pin on an Arduino Uno processor where the interrupt is configured for CHANGE interrupts (i.e., triggers on either a positive-going or ...
0
votes
0answers
191 views

STM32: no interrupt handler getting called

I am having problems with interrupt handlers on an STM32L052C8T microcontroller. Every program that I try to run hangs forever after an interrupt is fired. This holds for SysTick interrupts, other ...
1
vote
1answer
72 views

STM32 reading data from digimatic SPC and communication via I2C at the same time

I am working on an application running on STM32, which aims to read data from the digimatic spc protocol (mitutoyo device) and then send the data to the raspberry pi via the I2C bus. The Raspberry pi ...
0
votes
0answers
58 views

STM32: I2C works only sometimes with Interrupts

I'm working on a little project where I need to read the HMC 5983 Sensor with I2C from a STM32F103RB Board. When I tested the sensor with the Hal_I2C_Master_Transimt, everything worked fine. I could ...
0
votes
0answers
69 views

How does 'Interrupt on Change' work on a PIC 16f877A controller?

I have a problem with my program. I am using "interrupt on change" on a 16f877A microcontroller. I use MikroC. What the program should do: The program should generate an interrupt when I ...
0
votes
1answer
31 views

UART doesn't transmit all characters when using UDREn interrupt

Note: I am beginner :) MCU: Atemega328p In Method 1, I am using a UDRn data register empty interrupt once the transmit buffer is empty and inputting characters from ...
1
vote
0answers
143 views

ESP8266 using DS3231 to wake up from deep sleep

I am using the Arduino IDE to program the ESP8266 and am able to set the time, alarms on the DS3231 and test to see that they are firing. My problem is that I would like to use the SQW output to wake ...
1
vote
2answers
64 views

Does this interrupt improve performance even with while loop in ISR?

Note: I am a beginner :) MCU: Atmega328p Which program below burdens the CPU the least? Would it be a significant difference? Objective: to make a more "efficient" serial monitor by ...
0
votes
0answers
38 views

problem in programming ISR in 8051

in this code : ...
0
votes
1answer
66 views

Need more than two external interrupts in 8051

I am working with 8 YS-17 flame sensors and may need more in the future. There are only two INT0 and INT1 in port 3. Is there any way to get the other interrupts or I/Os to work as external ...
0
votes
1answer
51 views

Error Real Time Clock implementation AVR microcontroller

I want to create a real-time clock using ATmega328p microcontroller. The microcontroller's frequency is 1 MHz. So, I think I should use timer interrupts in CTC mode to generate interrupt every second. ...
0
votes
1answer
197 views

UART RX Interrupts Stop Working After a Few Seconds

I am writing a very simple program to validate that my board (STM32L4) can receive terminal (TeraTerm) characters via interrupt. The program runs as expected for the first few seconds (anywhere ...
0
votes
0answers
287 views

STM32 Timer - Issues with generating 1 us pulse on GPIO

I am using Nucleo-F767ZI board which has STM32F767ZI controller on it, and am in need of sending out a particular structure of elements bit-by-bit through a GPIO pin once every microsecond (1 MHz freq....
0
votes
4answers
108 views

Crystal tolerances and what that means for timer interrupts

I'm developing a system that needs to periodically wake up and perform a process. We're currently targeting for an hourly wake up (give or take, this spec is very loose). The key here is the unit cost ...
0
votes
1answer
594 views

What if you enable both DMA and Interrupt for a STM32 ADC

Imagine this scenario: You are using a timer driven ADC in DMA mode, nothing special. Now, because you are interested in having a Watchdog, you also enable the ADC Global Interrupt in CubeIDE (...
1
vote
1answer
102 views

Pin change interrupt won't toggle OFF my LED

Friendly Note: I am a beginner :) Microcontroller: Atmega328p LED = PORTB0 BUTTON = PORTB1 Aim: To have the button generate a pin change interrupt request which runs an ISR that toggles PORTB0 ...
0
votes
3answers
94 views

How to write own ISR handler

I am learning about avr programming and i know we have to use avr/interrupt.h library to use interrupt but my main reason to learn avr programming is to program without any library so i want to know, ...
0
votes
1answer
128 views

How to use PIC16F84A TMR0 Interrupt as a substitute to the Sleep instruction in Assembly

I have this circuit: So my problem is that I'm having trouble using the TMR0 interrupt as a delay or substitute to the SLEEP instruction in the PIC16F84A. I can't quite get the concept of using the ...
0
votes
0answers
20 views

Cannot seem to initiate Inerrupt in STM8S TIM2

I trying to initiate an interrupt every 1 minute. The Timer itself is working however, the interrupt does not seem to work. I have added my main code + the vector interrupt code. Please let me know ...

1
2 3 4 5
16