Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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.

74 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
2answers
271 views

Set up an ADC ISR, but every time an ADC Interrupt is called it goes to isr_trap.asm instead

I am trying to do a program with my MSP430FR6989 from Texas Instruments. I send an Analogue signal to my ADC module in the uC, which converts it to a digital signal, if the value is greater than 0x800 ...
3
votes
0answers
330 views

STM8 nested interrupt bug, not described in current errata sheet ES019

If main process execute WFI with AL bit set in CFG_GCR, changing I1/I0 priority bits in the ISR cause CPU stalled when nested IRQ occured. Preconditions: all ITC_SPR1 registers has default value 0xFF....
2
votes
0answers
67 views

Pulses counting problem from npn proximity with interrupts in arduino

I am interfacing an open output npn proximity sensor with Arduino nano. I have used very silly approach of voltage divider as I was not sure that in open output sensor you can get whatever voltage you ...
2
votes
0answers
80 views

How to implement multiple functions on single push button

I am using a STM32 Nucleo MCU and trying to pull a multi-function single-button method. I need a way to implement this form of functionality for a single push-button: Push 1: function 1 Push 2: ...
2
votes
0answers
30 views

MikroC trigger interrupt in compiler

I am trying to test the interrupt function at home without a board to push buttons etc. I gave up on my code and copied an example but still cant make it work. Below is the sample code. In the while ...
2
votes
0answers
77 views

nucleo-64 103rb EXTI stays pending

The PC13 EXTI interrupt (EXTI15_10) configured here keeps firing none stop. Most other questions about this same topic indicate that the respective EXTI_PR pending bit needs to be cleared in the ISR. ...
2
votes
1answer
177 views

How to reduce the effect of electric lighter noise on Micro controller?

I am using a kind of electric lighter in my circuit in order to turn the fire on. And also i have used some sensors that alert in danger by sending a signal to the MCU (ATmega 32) interrupt. The ...
2
votes
0answers
4k views

ESP8266 Wake from deep sleep with an interrupt

I have an ESP8266, and a MCP23008 I2C GPIO expander. The GPIO expander has the ability to trigger an interrupt when a pin changes - this is handy, as it means we can do something when an input pin ...
2
votes
0answers
2k views

How to properly send stop condition when using DMA with I2C?

I'm using DMA transfer to get 1024 bytes from master (STM32F407VG) to slave OLED screen (SSD1306). The library I'm using does this: ...
2
votes
0answers
613 views

AVR interrupt setup seems to stop program execution

On ATMEGA168PA I have problems with interrupt-driven character reception over UART. When I include the line setup_interrupt() it seems that program execution stops ...
2
votes
0answers
3k views

Msp430 I2C Single Byte Read Write

I have this code I've been working on that connects an ITG-3200 gyroscope slave and MSP430G2553 master via I2C bus. It was working fine yesterday but somehow today it is not working. I tried to debug ...
1
vote
0answers
49 views

How to set registers of accelerometer BMA220?

I first wrote my problem in Arduino Stack exchange (https://arduino.stackexchange.com/questions/68438/how-to-manage-interrupt-from-accelerometer-bma220) but I was told that I might get a better help ...
1
vote
0answers
46 views

STM32 I2C Fast Mode Issue

Currently, I am implementing I2C communication with Interrupt. STM32 serves as the slave and Arduino serves the master. MCU: STM32L152RDT6 For previous work, I2C communication in standard mode is ...
1
vote
1answer
54 views

STM8 TIM2 interrupt not taking place. What am I missing?

I've just started using STM8 microcontrollers, specifically the STM8S003F3P6 chip, in my own custom test board. The board works and I am able to blink an LED on PA3 without using an interrupt. However,...
1
vote
0answers
74 views

STM32F042 ADC Interrupt with STMCUBEMX

I need to read 15 channels ADC. However my MCU is specific named STM32F042K6T6. I decided to use an analog MUX to read every channel from just one pin. But, I didn't read accurately the datas by ...
1
vote
1answer
221 views

PIC32MX UART Interrupt Not working

I am writing a program to send data from one microcontroller and receive the data using on another PIC32 microcontroller and display the received data on LCD. I am using UART2 of both PIC32MX to send ...
1
vote
0answers
197 views

MSP430G2553 Reading from ADC10 Temperature with Button ISR

This is my lab assignment. When I press the button, the red LED toggles on and off. But, I can't seem to read anything from it. Also, there's an empty loop in the code, but I don't know what to insert ...
1
vote
1answer
530 views

How to reliably update duty cycle to PWM on arduino due with SAM3XE

I have arduino due, which has Atmel SAM3XE MCU. I want to generate PWM signal and I want to change duty cycle every cycle of PWM reliably so i can generate output signal such as sine on output pin. ...
1
vote
0answers
142 views

MCU wakes up from sleep periodically

I'm facing a weird behavior on SOME boards based upon CC3220SF. Scenario I have 20 units of my custom PCB, designed following the Design Reference Guidelines from Texas Instruments and - like they ...
1
vote
0answers
155 views

Interrupt priority in STM32F103RB

I got a doubt about an interrupt grouping in stm32f103. In programming manual of microcontroller I found 5 ways to configure it. But, while debugging, I found 8 ways. How is it possible to get ...
1
vote
1answer
1k views

stm32f0 uart1 rx interrupt

I have stm32f030f4p6 Microcontroller and using iar Compiler , library cmsis , After confige Uart1 the RXNE , FE and CMF bits return 1 whereas not recieve or send was done if I dont set RXNE bit to 0 ...
1
vote
1answer
102 views

Are there any ways to improve this ISR - STM32F401RE?

I am currently coding a flight controller from scratch and am currently working on the module to decode the incoming PPM signal. Keeping in mind that this is an ISR, I've limited its functionality ...
1
vote
0answers
315 views

Reuse I2C SCL or SDA Pins to signal interrupt

In an I2C network, I am using an AVR microcontroller (AtMega328p) as a Master and I hooked it up to multiple sensors as Slaves, such as the TMP102, SI1145, MPU9250, among others. All of these sensors ...
1
vote
0answers
317 views

Problem understending interrupt handling example in The Zynq Book

Sorry for basic question but I'm coming to embedded/fpga (as a hobby) from 'big' computers and I have trouble understanding example code from Zynq Book: ...
1
vote
0answers
421 views

Context Switch without interrupt disabled?

I developing a program on ARM M4 where I don't actually want to disable interrupt even when doing a context switch. If any interrupt occurs during context switch, is it possible to handle it soon ...
1
vote
0answers
620 views

How to set MSP430 Driver Library timerA configurations

I am using MSP430F5529 and MSP430 Driver Library. As you can see, I set upMode timer configuration, compare mode configuration and enabled the initial interrupts. However, timerA interrupt is not ...
1
vote
0answers
514 views

pic32mx220 won't enter uart rx interrupt handler

I'm kinda new to pic32 and have been trying to get the uart to enter the ISR when it receives a byte on the Rx pin. My uart setup works fine both sending and receiving (if I use blocking to read the ...
1
vote
0answers
254 views

LPC2148 + Eclipse + yagarto + openOCD. Issue with the interrupts

I'm using 'Eclipse-Indigo' + yagarto + 'openocd-0.7.0' setup for a project on LPC2148. I've set up the environment properly. I'm able to compile, link and debug the project. I've configurred Timer0 &...
1
vote
0answers
2k views

Simple PIC18 USART Interrupt not working

I'm trying to implement a link between and Arduino and a PIC18F25K22. I can transmit from the PIC and read the data on the Arduino, but am having trouble going the other direction. I think the ...
0
votes
1answer
57 views

Master SW (bit-bang) I2C with Interrupts?

I've written a set of "bit-bang" software routines for the PIC18F2620 device. These routines work well for reading and writing 24LC256 EEPROM and DS1307 RTCC devices for the most part. (I wrote this ...
0
votes
1answer
41 views

timer input capture for really low frequencies

How low of a frequency can a timer be used to measure an external signal in "input capture" mode? If I need to measure something that has a frequency of say 1hz - 2hz... or even slower for that ...
0
votes
1answer
66 views

STM32: Interrupt latency for serial protocol implementation

I am implementing a synchronous serial interface (SDLC) using an STM32. My original implementation for the RX side is running on a ARM7 which uses the FIQ to set an interrupt on the clock line, in ...
0
votes
1answer
53 views

Arduino to Attiny841 with ATTinyCore — pins not working

I have code that works using Arduino. Because I wanted to size down the project, I replaced it with an Attiny841. Process: I soldered the 841 on an adapter and checked all pins using a multimeter ...
0
votes
1answer
63 views

Do UART RX interrupts require support from the transmitter?

I'm trying to understand why I am seeing RX interrupts when tying RX to TX of my SAMR34 but not when I connect it to the transmitting device. The transmitting device notes the following restrictions: ...
0
votes
2answers
112 views

What is the difference between IQRn 0 and IRQn 1?

I am using STM32CubeMX to program my chip. Essentially I have a timer that i am trying to set to one ms, and every time that timer reaches a ms I want to toggle a pin. My question is that does it ...
0
votes
0answers
40 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
0
votes
1answer
119 views

DMA, Interrupt and UART connection in STM32 for detecting chararcters

I am trying to make a project and am planning to use DMA for my UART from one STM32 to another STM32. Here are some details of what am I using: Chip: STM32F107RB debugger and programmer: Atollic for ...
0
votes
0answers
31 views

digispark + pcf8563 RTC interrupt not working

I have PCF8563 WAVESHARE board connected to DIGISPARK via I2C. Here is the code: ...
0
votes
0answers
40 views

Calling a function that uses HW_Delay inside timer interrupt

I have the following timer interrupt configuration ...
0
votes
0answers
87 views

PIC timer1 interrupt never occurs

I am trying to use timer1 interrupt on PIC18F26K83. I use Micro C as compiler. So I set my timer for 30 ms and after that 30 ms, it is supposed to enter an interrupt and light the LED. But it never ...
0
votes
0answers
24 views

How to disable port2 interrupt when port 1 interrupt is active?

I am using MSP430G2553 with IAR. I would like to make an IR communication system which has a transmitter-receiver on both sides. When I try to send my signal, the receiver on the opposite can't ...
0
votes
0answers
66 views

Can't use the Wake-on-Motion functionality of an MPU9250 with STM32

Hi there :) I'm trying to use the Wake-on-Motion functionality of this particular MEMS (MPU9250) with my STM32L152C-Discovery board: if the MPU9250 sense a motion, the INT pin will be high. To achieve ...
0
votes
2answers
1k views

STM32 EXTI does not trigger interrupt

I am working on a device with a button that is supposed to turn it on (when pressed briefly) and off (when held longer). The MCU is an STM32L432. The button is connected to PB0. I want to use EXTI as ...
0
votes
1answer
73 views

Identifying unhandled interrupt

I stopped in the middle of debugging a very simple project where I send "hello world\r\n" every couple seconds out of USART2. The first print hits the console and then I hang in an infinite loop ...
0
votes
0answers
31 views

Using an MCP23017 port expander with momentary and toggle switches

I have a Teensy 3.2 connected to and MCP23017, running the Adafruit MCP23017 library. This is setup on a breadboard to simulate being connected to a home-made pinball game. GPA0,1 and 2 connected to ...
0
votes
0answers
60 views

Big code in interrupt freezes main function

I'm writing firmware for an ATSAM4S (runs at 120 MHz)and I noticed a strange issue with ADC interrupt handler. I set up ADC at 20 MHz, 5 enabled channels, and DMA transfer complete interrupt. ...
0
votes
0answers
14 views

Can anyone Explain me why nVICFIQIN is taken as input and ORed with FIQSTATUS and the output is negated to produce nVICFIQ

I am trying to learn VIC in Lpc2148. As you can clearly see the arrow in the picture. The nVICFIQIN is given as input to a OR gate and is ORed with FIQSTATUS register the result is then negated and ...
0
votes
0answers
16 views

In PIC18F4550,But CCP1 Compare Interrput using Timer1 is not working in Relaese Mode but works if use debug mode with pause & Start

I am using PIC18f4550. I am using Timer0 for time keeping which alone works fine. I have tested CCP1 interrput using TImer1 for pulse generation. It also works fine. When I mergred Timer0 time ...
0
votes
0answers
45 views

Timer interrupt priority over TCPSocket Callbacks

I have a Timer Interrupt Routine which runs periodically (1000/sec). I plan on using mbed's TCPSocket to receive incoming messages. For obvious reasons, this should not block. It is essential that ...
0
votes
0answers
242 views

SPI problem with STM32F103

I am trying to connect blue pill board(master) to arduino nano(slave) over SPI and read what I have sent on serial monitor. However I haven't been able to get SPI working. I run a timer to generate an ...