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
0answers
22 views

Generating two high frequency synchronous PWM pulses using Teensy 4.1

I am supposed to write a code for Teensy 4.1 so that I can generate synchronized PWM pulses at two different pins. The signal, in general, should give 5 MHz PWM pulses for a 10 us and after that, it ...
0
votes
1answer
34 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
101 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
26 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
37 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
27 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
19 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
44 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
92 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
62 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
33 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
40 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
69 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 ...
2
votes
5answers
165 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
59 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
48 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
49 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
65 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
30 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 ...
0
votes
0answers
76 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
63 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
36 views

problem in programming ISR in 8051

in this code : ...
0
votes
1answer
51 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
37 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
56 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
159 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
102 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
233 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
45 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
68 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
98 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
17 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 ...
2
votes
0answers
29 views

How to safely set/clear only some bits of SCB->SHCSR on ARM Cortex-M processors?

On p. 265 of the third edition of Joseph Yiu's The Definitive Guide to Arm Cortex-M3 and Cortex-M4 Processors, there is some discussion about the "system handler control and state register" (...
0
votes
0answers
44 views

Interfacing Arduino with TSL235 (light to frequency converter)

I am working on an Arduino based circuit that uses light to frequency converter (TSL235) to trigger a buzzer when there is an intensity change in the ambient light (for example when a car is pointing ...
0
votes
0answers
69 views

While(1) doesn't work when interrupt active

I use PIC18F45K22. After getting UART RX interrupt the program doesn't go back While(1) loop. ISR runs correctly by itself. I need LED blink continuously in while(1) loop. What is missed? I tried ...
3
votes
0answers
117 views

ISR won't modify a global variable (IAR)?

First, some background on what I'm working on. I have a custom board with ATmega324A that I designed as part of a project I'm working on. Originally, software for the uC was written for GCC in Atmel ...
1
vote
0answers
93 views

Wake up with external Interrupt from deep sleep mode (Adafruit Feather 32u4)

I have an Adafruit Feather ATMega 32u4. I want to put it into sleep mode and wake it up with pressing a switch as an external interrupt. This is what I tried so far and which worked: switching a LED ...
0
votes
0answers
53 views

How to detect the presence/ absence of a PWM signal on a GPIO pin?

I just want to set or clear a flag by detecting the presence or absence of a PWM signal with approximately >100 kHz frequency on a GPIO pin. I studied that a simple RC low pass filter can be used ...
0
votes
0answers
50 views

How to detect an I2C slave presence/ absence as an interrupt?

Involved in a task to build a test equipment with a ARM M4F microcontroller for the purpose of testing various PCBs. One of the PCBs has I2C compatible current/voltage monitoring chip on it. Is there ...
0
votes
0answers
8 views

Handling nPeriphRequest in IEEE 1284 ECP as an interrupt

I don't know if this is the proper forum for this. This can be as much system architecture and software as "electronics". IEEE 1284 is the standard that governs the PC Parallel port. It has ...
0
votes
1answer
117 views

MSP430 Timer Interrupt Not Triggering

I'll post my code below. The problem is that the MSP's ISR_TRAP function (a function that handles ISRs that are not otherwise handled) is triggering and trapping me in its endless loop. This happens ...
0
votes
0answers
136 views

STM32 CAN Interrupt causes program to jump in infinite loop

Struggling with this issue for days now and can't find a solution. Maybe someone saw something like this before and can give me a hint. I have FreeRTOS running on an STM32L4 with different tasks. One ...
3
votes
2answers
233 views

ESP-32 not working with big motor

I have spent the last two months trying to build a door controller for a chicken coop. The idea is simple: The ESP32 recieve signal from my house Wi-Fi to close or open the door. So the corresponding ...
2
votes
1answer
73 views

GPIO- Interrupt on a non-interrupt pin?

If a GPIO pin is not interrupt configurable as external interrupt, is it still possible by any chance to detect the button press on the pin without polling just like an interrupt?
0
votes
0answers
54 views

Why Arduino not receiving RS485 data?

I am trying to send data from Arduino mega (message "ping") to Arduino nano, then send back (message pong) to the mega board, I am not receiving "pong" back to the mega board, why ...
0
votes
1answer
105 views

Pushbutton Circuit - Triggers Event when no button press

I have been using the circuit below. I have noticed there are times the circuit will trigger on its own without any button press. Sometimes it can trigger a few times within an hour. The components ...
1
vote
0answers
175 views

STM32 - Configure Output Compare Registers on the Fly

since this is my first, feel free to give newbie a feedback :) I have a following setup with my STM32 Nucleo (simplified, ignore the HW behind): a) one input signal acquisition (Square wave, consider ...
2
votes
2answers
129 views

Interrupts using member function

I am trying to use a member function in an interrupt. The function uses member variables so I created a global instance of that class to use it in a static function. The problem is that I created a ...
0
votes
1answer
442 views

Input Capture with MCPWM on ESP32

I'm trying to capture a digital signal that consists of 8us HIGH pulses with 8us or 16us LOW pauses in between. There are additional LOW pauses of about 6ms (yes, ms) that separate data frames. I'm ...
2
votes
3answers
69 views

Best way to implement a global FAULT input

I've got several microcontrollers multiple feet away from each other in a network that must be able to be put into a shutdown state all at once, ideally before power loss. I want to trigger a shutdown ...

1
2 3 4 5
16