The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
2answers
240 views

STM32 CAN bus Rx interrupt only triggers in loopback mode

I'm designing the CAN interface for a STM32F042C4T6 to be able to receive and send messages. I've tested my code and everything seems to work perfectly fine in loopback mode. However, when I hook up ...
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 ...
1
vote
1answer
101 views

Breakpoint Alters PIO Interrupt Behavior - ATSAMV71

So I'm baffled by this... I'm working with an ARMv7-M microcontroller and GCC compiler, debugging some code where I'm trying to enable an interrupt. I'm trying to do the following: enable an ...
2
votes
4answers
359 views

Cortex M3 reset handler with vector table relocation

I have a system with an STM32F103, which has a bootloader and a main app. Now, the main app is offset from the beginning of the flash to make room for the bootloader, and on cold boot the firmware is ...
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 ...
2
votes
1answer
251 views

ARM Cortex-M3 Interrupts and Interrupt service routine &interrupt handler

I am trying to understand arm architecture and i got stuck with one concept, i.e, INTERRUPT SERVICE ROUTINE. I had gone NVIC structure for HARDWARE & SOFTWARE interrupts. But at some point i got ...
0
votes
2answers
225 views

Using Character Match functionality in a STM32F7 chip

I'm trying to implement a UART receiver that works by finding a '\0' in the datastream, OR when it receives 256 characters at which point the data should be processed by an interrupt. The point is to ...
0
votes
3answers
85 views

Really occasional malfunction of the Schmitt-trigger input

I'm using some Schmitt-trigger inputs for debouncing the interrupt problems. Referring to above circuit, the circuit has a RC circuit and the output of the RC circuit goes to the Schmitt-trigger IC(...
0
votes
1answer
380 views

STM32F7: activate USART Receiver Timeout Interrupt (USART_RTOR.RTOF)

I want the STM32F769NI to generate an interrupt when a pause after a received byte on USART6 was detected. I cofigured USART6 with 9600 baud in asynchronous mode and enabled the receiver interrupt ...
0
votes
1answer
65 views

USART ISR on TXC breaking delays from <util/delay.h>?

I am trying to work out USART ISR's on the ATmega 328P. So far I have got the USART rx and tx working. I have come across a strange issue when it comes to the UART ISR's, though. The ISR seems to ...
0
votes
1answer
77 views

ARM Debugging - Cortex M0 debugger gpio changing while halted in SysTick_Handler

I've been trying to figure out this one for hours and I can't see what I'm missing. I currently am debugging my program on hardware and I have set a break-point inside of one of the functions called ...
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
2answers
145 views

Interrupt works only once - PIC16F877a

In my code, I have two interruptions, one is coming from the overflow of the TMR0, and the other one is when a button is pressed. this is the code in MikroC : ...
0
votes
0answers
238 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 ...
6
votes
1answer
829 views

Inaccurate timer interrupt STM32

I wrote a simple program to toggle an LED on and off using the TIM1 interrupt on an STM32F0 discovery board. CLK Freq = 48MHz Prescalar = 48000 Auto Reload Register = 1000 Using the following ...
0
votes
1answer
65 views

MCP23S17 Interrupt Issue

I am having issues with interrupt setup on MCP23S17. Not able to set up the INTB line properly. I have an external 10K pull up resistor connected to the line and 3 input buttons connected to GPB0 - ...
1
vote
1answer
220 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 ...
0
votes
1answer
49 views

Why is the the uart_rx _interrupt is not triggering on a PIC32MX775F256H?

void __ISR(_UART1_VECTOR, ipl6) IntUart1Handler(void) { if(!INTGetFlag(INT_U1RX)) { g_intraised++; } IFS0bits.U1RXIF=0; } uart ...
3
votes
3answers
1k views

STM32 CAN bus receive interrupt is sometimes not fired, and CAN transmit sometimes times out

I have two STM32 boards connected via a CAN bus. They periodically transmit a message to each other. For some transmissions however, HAL_CAN_Transmit returns with ...
0
votes
0answers
76 views

Problem with using Timer Counter interrupt on Atmel ARM

I'm using an ATSAM4E16C microcontroller and i need to get a 1 millisecond tick. I want to implement this using the timer counter module to trigger an interrupt. The clock frequency is 96 MHz, so using ...
0
votes
1answer
91 views

Why disable interrupt is time-consuming in multi-processor computer?

I have a book statement: Disabling interrupt is time-consuming in multi-processor system. I suspect that this is related to the hardware implementation of how interrupt is enabled/disabled. So ...
2
votes
2answers
323 views

Can't trigger AVR ADC Interrupt

I am using an Atmel's XPlained mini board with Atmega328PB. I am trying to use ADC interrupt, however I can't get it to fire. Here's the code that I have a problem with: ...
0
votes
1answer
208 views

STM32F411VE ADC interrupt not working

My code works fine without interrupt (I tried polling the ADC value) but when I enabled the interrupt, it didn't work - while debugging in Keil, it never reaches the ...
0
votes
1answer
251 views

Problem with interrupt-based timer on STM32F411

I was following this online tutorial and cannot get the interrupt-based timer to work. I know the timer is running because if I uncomment the five lines in the main loop, I get a nice square wave ...
0
votes
1answer
38 views

Interrupt during packet transfer

I'm using the mbed TCP/IP Socket library to receive incoming messages via ethernet. Currently, the incoming data is read in an infinite while(1) loop (i.e. as fast as possible). I will also be ...
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 ...
0
votes
3answers
108 views

Interrupt debouncer for switch sensor

I want to read the state of a switch sensor (magnetic contact). I'm thinking to connect the switch between an interrupt pin of my micro and ground, listening for CHANGE status. In this way I have ...
0
votes
1answer
83 views

What are the minimum and maximum number of cycles consumed when executing an interrupt on an STM32F0 MCU?

Assuming I set an external GPIO interrupt to highest priority, how many cycles does an STM32F0 MCU take to: start executing the interrupt handler code return from the interrupt I expect that the ...
0
votes
0answers
27 views

Can standard 8051 timer 1 and timer 0 be available to programmer when serial mode 1 is used?

The micro is an AT89C4051. It allows two timers and a serial port interrupt. Currently, I set things up so that if any kind of data is received on the serial port, it just is loaded into memory by ...
2
votes
1answer
890 views

NVIC Pending register vs EXTI Pending register (STM32F4)

Why there are two pending registers for interrupt? One of them is EXTI_PR and other one is Interrupt Set-pending Registers(ISPR) which is in NVIC controller registers. EXTI unit pending register: ...
3
votes
2answers
267 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 ...
0
votes
1answer
157 views

LIS2DH12 Watermark and Overflow Interrupts at the same time

I'm working on a project that uses the LIS2DH12 accelerometer by ST (product page). I have a couple of questions about it, and as it is quite a common part, I wonder if anyone here knows the answers: ...
0
votes
1answer
55 views

STM32F030(K6) Systick not triggering (BOOT0 problem)

I'm trying to write a simple program for a STM32F030K6T6 microcontroller. The problem I am facing is the more common "Systick is not working" problem. The code is generated using Cube32MX (Firmware 1....
0
votes
1answer
118 views

Using UDRIE0 interrupt in ATmega168

I only have some limited knowledge in interrupts. This is what I understand about following ISR functions ISR(USART_RX_vect) will get called when a new data ...
1
vote
2answers
452 views

Timer0 overflow interrupt does not work on ATtiny10

I am trying to use the Timer0 overflow interrupt to make a little project. I used such a timer in the ATtiny45 and it worked, but with ATtiny10 no result. So I tried an easy LED blinking program and ...
0
votes
1answer
84 views

ARM cortex-A7 - cycle interrupts

I'm using a Banana Pi M3 with an ARM cortex-A7. I want to perform a task in a cycle with a fixed period with no delays and I was wandering if I could use an interrupt for that. Does this processor ...
7
votes
7answers
3k views

Is it possible to interrupt the copy process of a struct by an interrupt in embedded C?

Inside the driver I have got a function to copy the data from the internal struct into a struct from the application. Can this process be interrupted by a microcontroller interrupt trigger? ...
6
votes
2answers
1k views

Nested Vectored Interrupt Controller (NVIC) - Why is it “nested” and “vectored”?

In ARM microcontrollers there is an peripheral called NVIC (Nested Vectored Interrupt Controller). What does the "nested" and "vectored" part refer to, or why is it "nested" and "vectored"?
0
votes
1answer
227 views

Understanding atomic writes to GPIO on different ARM Cortex-M's

This video succinctly describes why the read/modify/store has potential problems when it comes to interrupts. Very clear and understandable. He uses the TI Stelarris Cortex-M4 as a teaching board ...
2
votes
2answers
100 views

Interrupter on induction heater

Im currently trying to control the power of my induction heater, i want to use an interrupter to control it. but if i now interrupt the driver at random points, the mosfets wont turn off at zero ...
1
vote
1answer
127 views

5V Tolerant Way To Generate Rising Edge Signal on USB Connection

I have a microcontroller device that can be awakened from deep sleep mode when it detects a rising edge signal on a wakeup pin. The wakeup pin is 5V tolerant and I'd like a connection to a USB port to ...
0
votes
1answer
159 views

LSM9DS1 accelerometer with too many aux pins. Which ones are actually useful?

I'm designign a board with an LSM9DS1. I have an SPI bus (with only this device connected), two gpio for the chip selects (it has two CS, one for gyro and accel and the other for the magnetometer. ...
4
votes
2answers
286 views

Is it a good idea to refresh a display (8x8 LED matrix in this case) inside an interrupt handler?

Let's say I have an Arduino connected to a 8x8 LED matrix. In my case, the LED matrix is driven using two 74HC595 shift ...
8
votes
2answers
808 views

ATtiny13A - Can't generate software PWM with CTC mode

I'm trying to make a remote control RGB LED light using an ATtiny13A. I know the ATtiny85 is better suited for this purpose, and I know I might not eventually be able to fit the whole code, but for ...
0
votes
3answers
3k views

STM32F4 How are Preemption Priorities and Sub-Priorities used?

I have started working with ARM-based microcontrollers. I not understand subpriority and preeemptionpriority. For example: NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00; ...
0
votes
1answer
169 views

Output Compare Interrupt does not work avr atmega

Hey I'm trying to do blinking led using interrupts on 16 bit timer. My atmega model is Atmega168A. Chip clock rate is 12Mhz. Here is my code: ...
0
votes
1answer
103 views

Atmega168 interrupts not working

I am trying some simple programs to test my microcontroller, but I am having trouble with the first test program: blinking an LED using interrupts. I'm using an Atmega168A-PU. Here is my program: ...
-3
votes
2answers
412 views

Edge detection circuit (for rotary encoder)

I managed to decode a rotary encoder using an arduino to read the input signal but I noticed other than the interrupts, the code is mainly made up of lines similar to: "IF this AND that OR that AND ...
0
votes
1answer
70 views

Single Button Power Switch and Mode Selector

I am currently creating an embedded project and would like to know what you all think is the best way to proceed. My setup at its most basic is an ATMEGA328P, a simple momentary pushbutton, a ...
3
votes
2answers
272 views

Is D flip flop equivalent to frequency mixer (difference frequency) for square waves?

I was trying to make a frequency mixer (only difference frequency) for two square waves (PWM1, PWM2, both 0.5-4KHz range) using ONLY Arduino due. I'm new to signal processing, and the only way I can ...