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 dependant upon which interrupt was generated. Interrupts can be either Hardware sourced or software sourced. It is an alternate ...

learn more… | top users | synonyms (1)

0
votes
0answers
6 views

Configuring the rate of Timer interrupts for the STM32F4xx Discovery Board

I'm working on a project with the STM32F407 board and Keil, and as part of a larger project I'm working on I need to configure a timer interrupt. Eventually it will run at around 46 kHz, but for now ...
0
votes
1answer
39 views

Simple Interrupt Handling program?

I'm new to Embedded programming and I'm trying to understand how Interrupt handlers work in different contexts/scenarios. I just want to know how a interrupt handler would work in the following ...
0
votes
0answers
12 views

Systick Timer problem

I am trying to use the systick timer to update a variable which stores millisecond elapsed on a STM32F051 in Coocox ide 1.7.8 . I also want I2C and UART communication in my project. I managed to get ...
1
vote
0answers
27 views

STM32F051 TIMER2 INTERRUPT PROBLEM

I would like to get TIMER 2 working for stm32f051 microcontroller in coocox IDE(1.7.8) . The problem i am facing is that as soon as I enable the intrrupt for TIMER 2 using NVIC_EnableIRQ(TIM2_IRQn) ...
0
votes
0answers
31 views

8051 interrupt timing [on hold]

In the question above only timer 1 and serial interrupt have high priority. Each interrupt service routine takes 1.2ms. I couldn't decide the priority after 2.4 ms of the program execution. Since ...
0
votes
1answer
28 views

AVR global variable modified by interrupt not persistant

Using an ATmega328p, I'm running into a problem when I make an interrupt (INT0 or INT1) active, the code will execute just fine (MusicOnLed and FadeOnLed functions will execute), however as soon as I ...
0
votes
0answers
29 views

How to read data from a rotary encoder with ATmega328 [migrated]

I'm using a home made "bare bones" Arduino, made with the ATmega328, and I need to read angle data from a geared DC drill motor, turning at speeds between 0 and 450 RPM. This is so I can use it as ...
0
votes
0answers
35 views

PIC18: I2C with external triggered interrupt stuck in ISR

I am trying to implement a simple, external, pushbutton trigerred I2C communication between a PIC18F46K22 and a ST LSM330D MEMS sensor. I tried to find straightforward libraries for the easy ...
1
vote
2answers
55 views

Arduino analog interrupt LDR

I am using an LDR on an Arduino Pro Mini with an analog interrupt. The Arduino goes to deep sleep when there is no light or it's not busy: Sleepy::powerDown(); ...
0
votes
1answer
33 views

Atmega2560 Usart Interrupt problem

When I send any data from serial port, RX pins are flashing but ISR is not running. Here is my code. ...
4
votes
2answers
182 views

Interrupt fails to change variable, how so?

Problem was virtually undebuggable, the interrupt that was changing a variable would randomly fail to do so, with no apparent pattern; within interrupt code variable would change but outside of it the ...
2
votes
1answer
45 views

PIC18 High Priority Interrupt doesn't Interrupt the Low one (xc8)

I was trying to learn and implement the priority property of interrupts on PIC18F46K22 uC. I use MPLABX and XC8 compiler. In my code (transformed from a sample code), I have one external interrupt ...
0
votes
1answer
36 views

PIC18 IO polling

I just recently decided to migrate an existing design which was based on Interrupt on change pins to standard IO polling due to some constraints in the part that I was using. I am trying to figure out ...
0
votes
0answers
22 views

PIC18 Interrupt on change vs polling

I am currently using a PIC16 part whose entire PORTB ports have the Interrupt on Change feature. I am forced to migrate to the PIC18 part as I gain more GPIOs but only the upper 4 bits of the PORT B ...
0
votes
1answer
33 views

Interrupt on the XMEGA

I have 3 buttons connected to PIN1, PIN3, PIN5 of PORTA of an XMEGA. If pushed they deliver a falling edge. I'm try to generate interrupt using those buttons, I started with one, here is what I ...
0
votes
1answer
22 views

AVR Timer1 OCR1A controls TIMER1_COMPB_vect interrupt!

I was struggling with timer interrupts in my project. I couldn't make it work properly. So I decided writing a simple code and I saw a very interesting case. ...
1
vote
3answers
52 views

PIC32, XC32, timer interrupt vector not entered

I have the below timer 5 interrupt vector that is not entered, even when both the corresponding Interrupt enable bit for timer 5 is set, and the corresponding interrupt flag for timer 5 is set. Here ...
0
votes
1answer
52 views

PIC18f8722 interrupt problem

I did many research but couldn't find out what the problem it is. Actually my code as below. I am trying to implement a code in C with XC8 compiler. To enable a sentence on the LCD of the board ...
0
votes
1answer
45 views

toggling a pin using the hardware compare feature of timer1 AVR

This link - says: "In CTC mode, you can also trigger interrupts, but it is also possible to not use interrupts and still toggle an output pin. Using it this way, the functionality occurs ...
1
vote
1answer
38 views

Valid use of ISR_NOBLOCK

I am using two timer interrupts: TIMER0_OVF triggered every 12 ms, with its ISR only polling a pin, conditionally setting a flag and incrementing a value, so it ...
0
votes
3answers
80 views

AVR-C turning led off after number of blinks with interrupts

so what I am trying to do is that I am trying to make the led blink for a certain number of times before it turns off. I want to avoid using delays so I tried utilizing the interrupt and I also used a ...
0
votes
2answers
68 views

UART interrupt problem on LPC1788

I wrote a code ...
0
votes
1answer
60 views

Attiny10 not triggering timer overflow interrupt while simulation (Atmel Studio 6)

I have problems simulating the timer overflow in Atmel Studio 6. The code is for an Attiny10 and looks like below. As far as I know I set all the neccessary bits to enable the counter (which works in ...
2
votes
3answers
88 views

Interrupt question ARM?

I often see something like this void UART2_IRQHandler(void) __irq, and I wonder why __irq is used when declaring interrupt handler, is it required or handler can ...
0
votes
1answer
71 views

UART Interrupt won't work

I have a problem when trying to test send and receive lines on RS485 communication, anyone know what may cause a problem here? It works without interrupt but with interrupt won't work. I am working on ...
1
vote
1answer
70 views

Determine if button press triggered wakeup from STOP mode with STM32F0

I'm using an external interrupt triggered by a button press to wake up an STM32F030K6 from STOP mode. I was wondering if there's any way of distinguishing, within the interrupt handler, a button press ...
0
votes
2answers
64 views

intel nuc gpio access from ubuntu

I want to implement Interrupt Request via GPIO on Intel NUC d34010wkb. Are there any accessible GPIOs on board and how to access them? If there aren't any accessible GPIOs then what could be a ...
2
votes
4answers
359 views

Understanding interrupts and software button debounce

I'm quite new to AVR programming (avr-gcc). To react on button-press, I am using a PCINT ISR with the internal pull-up resistor enabled like this: ...
0
votes
1answer
68 views

Stop timer set new value and start again AVR (Interrupt)

I have AVR MCU. I am playing with timer now. What I need ? I have timer counting up with some frequency. In each interrupt I am incrementing variable, and somewhere I need to check value of this ...
9
votes
3answers
1k views

Software interrupt vs function

After about 3 years of working with MCUs still I don't know what's the use of Software interrupts? I have done several jobs with STM32 and I have never used the software interrupts. Indeed this is a ...
0
votes
0answers
37 views

Interbytetiming ,kwp2000,Fastinit

How to set interbyte delay, I should be able to get 25ms low and 25ms high and later the data bytes at 10400 baudrate, implementing kwp2000 protocol. When I send bytes ...
8
votes
4answers
704 views

Interrupt handling in microcontrollers and FSM example

Initial question I have a general question about the handling of interrupts in microcontrollers. I am using the MSP430, but I think the question may be extended to other uCs. I would like to know ...
0
votes
0answers
21 views

Expanding the Interrupt Structure of an 80286 System using a 74ALS244

Can we initiate a type 2 interrupt(or Non-Maskable Interrupt) even though Device 1 never issues an interrupt request? And how to do it? I think we should connect the interrupt request of type 2 ...
0
votes
3answers
62 views

How to get equal number of clock cycles before ISR on an AVR

While writing a time critical piece of code for an Attiny13, I figured I could use the rising edge of an input as a trigger to read in some self clocking data. However, the number of clock cycles ...
0
votes
1answer
60 views

STM32 and SDCard: space management

My task is to gather measurement from peripheries of STM32F4 on SDCard and I started reading about this. Could you double check if I'm correct: Single block memory on my SDCard is 512 bytes, so ...
1
vote
1answer
63 views

Testing the ADC interrupt on dsPIC33EP256MC506

I have a Microchip MCLV-2 development board intended for controlling small rating BLDC and PMSM. I am trying to develop a simple program to test the ADC interrupt. Basically, I want the program to ...
1
vote
0answers
55 views

PIC32 Input Capture Module

I'm trying to use the input capture module on a PIC32MX250F128B to measure the frequency of a square wave. The results I'm getting are both inconsistent and incorrect. All I'm trying to do here is ...
1
vote
1answer
91 views

Interrupt within an interrupt on a PIC18

I am working on code for an external interrupt from RB0 on a PIC18F4550. When an interrupt is detected on RB0, timer0 is activated. I then need to watch for timer0 overflowing. If it does, then the ...
2
votes
1answer
175 views

STM32: Timer interrupt works immediately

This is code for timer in my project on STM32F429: ...
0
votes
0answers
18 views

program stops in non maskable interrupt when initializing time interrupt

I am using RX62N microcontroller and am new to it. In this i was trying to blink the led using interrupt(compare match timer) but after the initialization it always goes to the non maskable interrupt ...
1
vote
1answer
68 views

PIC18f4550 Timer setup for 1sec Interrupt

I want to generate Interrupt(on PIC18f4550 using TIMER0) every 1 sec but by using the following code interrupt is generated after every 6 secs. ...
2
votes
1answer
50 views

How to use level-triggered interrupts with STM32F1xx?

I'm getting conflicting info on whether I can use level-triggered (as opposed to edge-triggered) interrupts with the STM32F1xx microcontroller. In ST's CMSIS-compliant Standard Peripheral Libraries, ...
2
votes
2answers
127 views

Is there stack available in PIC ISRs?

I'm trying to better understand the interaction between the foreground (interrupt) and background (while (1)) loops in a PIC microcontroller. Specifically, a ...
4
votes
3answers
137 views

interrupt using Timer0 on PIC18f

Im looking for a little help and advice on my code. Im using C18 in the MPLab environment, PIC18f4520 with Fosc @ 4MHz, and usnig timer0 in 16 bit mode to count to overflow, set the overflow bit and ...
5
votes
3answers
672 views

How to read whole data sent to USART with interrupt?

I am currently able to read byte by byte from USART with this code ...
2
votes
1answer
46 views

Managing addresses of interrupt service routines and functions of the program in cortex M0

I am working with nordic nRF51422 uC with cortex M0 core and I have to store data in Non-Volatile Memory but to do that properly I need information where exactly code of the program is stored in ...
0
votes
1answer
199 views

ADXL345 Arduino UNO Activity Inactivity interrupt

I have DATA_READY, Activity and Inactivity interrupts mapped from INT1 to INT0 on the arduino. DATA_READY works fine, the problem is Activity and Inactivity are always set to 0 in the INT_SOURCE ...
2
votes
1answer
208 views

ADXL345 Arduino UNO data_ready interrupt

I would like the sensor values to be updated each 10ms(100Hz) and then run the algorithm and repeat the same process. However, after timing the algorithm it is taking only 2ms, I think the data_ready ...
1
vote
1answer
143 views

Using an External interrupt from any pin PIC16F873A

I'm trying to use an interrupt, which will occur on a rising edge of a signal coming from my LSM303DLHC accelerometer. The accelerometer has a Data Ready (DRDY) signal that fires every time new data ...
-3
votes
1answer
126 views

flow meter that displays litres per hour [closed]

for the past 2 week iv just started my first ever project to make a c program on the software called mikroc where i would get pulses in from the flow meter and calculate the flow rate of how much ...