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
0answers
373 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
92 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
91 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
40 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
80 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
201 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
5k 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
664 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
60 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
127 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
139 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
87 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
292 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
236 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
584 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
148 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
168 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
106 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
351 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
330 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
444 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
658 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
536 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
257 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
0answers
43 views

Unexpected result reading pin on clock rising interrupt

What I try to achieve is a simple one-way communication between two MCU's (ATTiny85's to be exact) at 16Mhz. This is just a start, to figure out it can be useful, very basic and needs to be very basic....
0
votes
0answers
18 views

Pullup Rise Time On AVR External Interrupt

Background I am designing a simple lamp dimmer using the Atmel ATTiny441 microcontroller. To this end, I have designed a very basic zero-cross detector which feeds the external interrupt pin (INT0) ...
0
votes
1answer
19 views

ATSAM4E UART1 interrupt not working

I am working on ATSAM4E8C on custom board. The uart0 and its interrupt is working fine but while on uart1 I faced an strange issue. The uart1 is sending the data but interrupt handler is not calling ...
0
votes
0answers
35 views

FM4 interrupt only once

I've bought an FM4-176L-S6E2GM board and successfully run the board example projects. Now I would like to modify the s6e2gm_I2S_hp project in order to continually stream a a buffer using interrupts ...
0
votes
0answers
88 views

STM32 - HAL SPI receive interrupt not entering EXTI callback

I designed a breakout board for the STM32F401CEU6. (Schematic attached) I am using it to receive data from an ADC chip over SPI. The ADC chip has a data ready output which should be used as an ...
0
votes
0answers
54 views

STM32 __HAL_TIM_GET_FLAG vs. __HAL_TIM_GET_IT_SOURCE and how doing without (CMSIS)

I'm trying to configure a timer (on STM32F0 but I guess it's the same on the rest of the STM32F family) with Output Compare to get an interrupt for two different actions at two different time ...
0
votes
0answers
33 views

Touchscreen keeps failing to communicate with raspberry pi, except when I touch the INT pin

I bought a display with a i2c touchscreen from Aliexpress and hooked it up to my Raspberry Pi 3b+. The screen part works fine, however, the touchscreen part is flaky. When I just boot the pi, the ...
0
votes
0answers
31 views

ATmega328p: Does SPI conflict with timers TC1, TC2 or interrupts PCINT2, PCINT0?

My code - based on my library MultiTrans - uses timers TC1 and TC2 as well as interrupts ...
0
votes
1answer
67 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
124 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
100 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
64 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
233 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
256 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
66 views

digispark + pcf8563 RTC interrupt not working

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

Calling a function that uses HW_Delay inside timer interrupt

I have the following timer interrupt configuration ...
0
votes
0answers
94 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
90 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
0answers
54 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
61 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. ...