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
1answer
75 views

Second interrupt dos not work in MSP430

In this project i want to control dc motor with numeric keypad. when I push a button first time, it works properly but when i push a button second or third times it does not react and it stays ...
11
votes
4answers
681 views

How does the controller know when to jump to the ISR?

I am talking about things at the core level. As far as I understand, the controller core just executes instructions which are fetched from the memory (Fetch - Decode - Execute). When an Interrupt ...
2
votes
1answer
44 views

Setting port in main loop causes ISR to starve

The example code initializes an asynchronous timer that is fired every second sets two ports as outputs (PA4, PA6 - LEDs connected) the timer ISR toggles pin PA4 permanently sets pin PA6 to 1 in the ...
3
votes
2answers
49 views

Low power strategy for dealing with spontainious bit flips durring sleep on AVR 8-bit?

I am designing a ATTINY-based circuit that is intended to run unattended for very long periods of time on a very small battery. The device spends almost all of its time in deep sleep, and only wakes ...
0
votes
2answers
49 views

Help driving 9V circuit with a 5V RTC clock interrupt pin (active low)

I am using this RTC clock module (http://datasheets.maximintegrated.com/en/ds/DS3231.pdf). The DS3231 has alarm function that can be programmed twice a day. When the alarm goes off it makes the ...
3
votes
7answers
282 views

MCUs which can trigger an interrupt on a port mask

(Hobby and learning, not a professional question.) I'm designing a circuit which uses a CPLD to turn a half-dozen inputs into a single output which triggers an interrupt in a microcontroller. Are ...
0
votes
2answers
58 views

How to make the code run only on interrupt?

I have the following code which is supposed to count the number of interrupts on pin P3.2 (external interrupt) and display it on UART. But this code is doing exactly opposite of it i.e. it's running ...
3
votes
0answers
47 views

How to implement critical sections on ARM Cortex A9 for GCC, no OS? [duplicate]

I am porting some legacy code from an ARM926 core to CortexA9. This code is baremetal and does not include an OS or standard libraries, all custom. I am having a failure that appears to be related ...
4
votes
2answers
105 views

How to implement critical sections on ARM Cortex A9

I am porting some legacy code from an ARM926 core to CortexA9. This code is baremetal and does not include an OS or standard libraries, all custom. I am having a failure that appears to be related ...
1
vote
1answer
37 views

PCF8574T I2C to 8bit Parallel

I want to connect 5 of pcf8574t on my AVR ATMEGA32L. One for LCD 2x16 and 4 for general purpose I/O. The question is: if i get an interrupt signal from one of 4 chips, how can i know which chip has ...
1
vote
0answers
27 views

Problem with Constant Off-time PWM/Variable Frequency on dsPIC30F2020

I'm using the Microchip dsPIC30F2020. I've been trying for the longest time to get some sort of PFM signal for my project. I see in Section 12.4.7 there is the ability to have constant off-time PWM ...
1
vote
0answers
38 views

STM32F4xx WFI unable to sleep due to SysTick Interrupt

I am trying to add some power conservation to our STM32F4xx powered device using its WFI sleep function. However, whenever I call the WFI function, the system is not being put to sleep (or rather, it ...
0
votes
1answer
43 views

Timing Delay Error

I am new to embedded system programming. I am working on clock using 8051 timer and interrupt.The delay is perfectly of 1s but when I run my clock with computer clock I loses 3-5s in 10min.I have try ...
0
votes
2answers
67 views

Choice of the appopriate conditional statement

I'm measuring the width of a PWM puls with the external interrupt: ...
4
votes
2answers
128 views

What is the difference between context switching and interrupt handling?

I'm an embedded developer. I haven't worked with RTOS/linux. I was going through RTOS concepts when I stumbled upon 'context switching'. I understand that when context switch occurs, all the registers ...
2
votes
2answers
92 views

Timer interrupt on stm32f103

I'm having a little suprise with timer interrupt on update event. I thought that if timer is configured to count up, update event will occure just after the overflow, i.e. when CNT will become equal ...
1
vote
1answer
83 views

External interrupt doesn't set flag bit

My goal is to measure PWM pulses. But to achive that I'm making baby steps, so my first goal is to set a pin when an edge of the PWM signal is detected. The PWM signal enters the microcontroller ...
0
votes
1answer
82 views

I2C hangs during loop

I have an arduino, accelerometer and a simple audio synthesizer circuit. My goal is to receive data over I2C from accelerometer to control the synthesizer. However I cannot get both the things to ...
0
votes
1answer
66 views

Clearing/acknowledging of level triggered interrupts

I am confused with the clearing/acknowledgement of level triggered interrupts in an SoC. When an interrupt is level triggered should the clearing be done in the interrupt controller or the bus ...
0
votes
0answers
62 views

How do I avoid a reset when using the watchdog in interrupt mode and changing the timeout?

I'm writing a program for an ATtiny85. I want to use the watchdog to wake up from power down in certain intervals. It all works fine as long as the intervals for a watch dog event don't change within ...
1
vote
2answers
67 views

Same Priority Interrupt on ARM Cortex M0

I have two two interrupts of the same priority; each has its own interrupt service routine: ISR_A and ISR_B. When interrupt A occurs, ISR_A executes... what happens if interrupt B occurs while ISR_A ...
1
vote
1answer
199 views

PIC32 does not get UART RX interrupts in xc32 Compiler

I'm trying to setup a UART channel on my PIC32 MCU (PIC32MX470F512). But the code does not reach the ISR at all. I have verified that the PPS (peripheral pin select) is configured properly and the ...
1
vote
0answers
40 views

Not entering ISR for timer 4 in stm32f4

I have coded for Timer 4 in a STM32f407vg discovery board. But while debugging the control is not entering the ISR. Please find the code below and help: ...
2
votes
4answers
109 views

Level vs edge triggering, usefulness of level triggering

Many processors / µCs / dev-platforms (BeagleBoard, Arduino,...) use interrupts. These can be triggered by the detection of: HIGH level RISING edge CHANGING level (either FALLING or RISING edge) ...
6
votes
1answer
70 views

Millis versus centis on AVR platform

I am building a device on the AVR platform. The device will need some timing information, so I was thinking of reimplementing Arduino millis-like functionality ...
0
votes
3answers
142 views

I'm trying to implement interrupt from RB pins. But it doesn't work

I'm new to PIC programming. I made a program to get interrupt from RB pins. but it doesn't work. My code is as follows: ...
1
vote
2answers
101 views

Two functions in the high priority interrupt

I'm using the PIC18F46k22 mcu and I'm using two function in my high priority interrupt routine: ...
3
votes
1answer
76 views

Are there platforms where disabling/restoring interrupts from ISR should be done differently than from non-ISR context?

I'm familiar with several real-time kernels: AVIX, FreeRTOS, TNKernel, and in all of them we have 2 versions of nearly all functions: one for calling from task, and second one for calling from ISR. ...
0
votes
2answers
58 views

Role of the MMU in a Page Fault Swap

When a virtual memory address outside the range of loaded into physical RAM is referenced and a page fault occurs, does the Memory Management Unit rely on DMA (Direct Memory Access) to swap the ...
1
vote
3answers
103 views

Returning from interrupts at a different location from where the interrupt occurs. (PIC16F877A)

Is there a way to return from interrupts at a different location from where the interrupt occurred in Microchip PIC16F877A? I have a problem where I need my code restarts at a specific point always ...
0
votes
1answer
42 views

Program aborts after ISR

First I am new to this and I signed in to get some help on this problem I have been having. I have done so much googling to figure this problem out and with no luck. I am trying to capture humidity ...
0
votes
1answer
49 views

Unexplained behavior pic port b on change interrupt

I am trying to configure the port b interrupt on change interrupts to work with a program I am writing with MC XC8 demo version. I am using a PIC16F628A I am using this code to initialize the pic for ...
1
vote
3answers
81 views

Catch both sides of a clock change PIC interrupt

I am trying to build an IR remote receiver using a PIC16F628A. To do that, I need to catch both the falling and rising edge of the external interrupt pin. From the datasheet it appears you can only ...
0
votes
0answers
54 views

LSM303DLHC data ready interrupt

I have a STM32F3-discovery board, and I have set up a little test. It just captures ALL input on GPIO3 and count them by channel. Then every seconds, I have a breakpoint with which I look at the ...
1
vote
0answers
52 views

8051 external interrupt INT0 issue?

How do I write an ISR greater than 8 bytes which is triggered by INT0?
0
votes
1answer
122 views

Measuring pulse length with ICP

I am trying to measure pulse length, with ICP (input capture pin) on Atmega8, coming from this circuit:. PINB0 is ICP pin on AVR. This is (most of) the code: ...
2
votes
2answers
347 views

STM32F103, Having trouble nesting interrupts

I'm trying to interrupt into a USART handler from inside an RTC_Alarm handler, but it doesn't work. I have set the NVIC: ...
0
votes
0answers
64 views

AVR TWI/I2C Not Responding

I use Twi module of AVR Atmega168 to talk to DS1307. ...
3
votes
1answer
99 views

SLEEP or busy-waiting. Which would service an interrupt faster?

I'm programming a PIC microcontroller to service two events via interrupts on a very time constrained environment. PIC microcontrollers allow a SLEEP mode which wakes the PCU on any external ...
1
vote
2answers
391 views

PIC18 xc8 compiler : how to resolve warning (335) unknown pragma “code”

I'm trying to compile this code to blink led with button interrupt, using xc8 compiler and PIC18F4550. I got those warning, so the code lines are ignored and the program doesn't work properly (by ...
1
vote
1answer
148 views

Implementing input capture correctly on a PIC

I'm using a PIC16LF1827 with the XC8 compiler in MPLAB X. I need to store the time between pulses that are coming from an external moisture sensor. The length of time correlates to the measure of ...
0
votes
2answers
145 views

Faster quadrature decoder loops with Python code

I'm working with a BeagleBone Black and using Adafruit's IO Python library. Wrote a simple quadrature decoding function and it works perfectly fine when the motor runs at about 1800 RPM. But when the ...
1
vote
1answer
199 views

STM32F1 troubles with a timer

I'm having some troubles with setting up a 1 second timer on STM32F103 mcu. I have set Timer 2 to have a prescaler of 1099 and a period of 65514, so I'm expecting to have a 1 second interrupt rate: ...
0
votes
0answers
156 views

Is USB UHCI polling-based or interrupt driven?

I've had a discussion with some colleagues whether USB is polling based or interrupt-driven. Some claim USB keyboards involve larger overhead than i.e. PS/2 keyboards due to the requirement of former ...
1
vote
1answer
185 views

Why does my Arduino DUE not recognize my external interrupt?

I'm simply trying to get my Arduino DUE to toggle a pin based on an external clock. I have a 14.31818 MHz Oscillator that is ...
0
votes
2answers
136 views

Calculating how many times TIMER1 will overflow

I'm trying to understand how to set up an overflow interrupt on ATmega328 TIMER1 to measure a frequency. I'm feeding pin PD4, which is where TIMER1 is externally clocked, with a 503kHz square wave ...
1
vote
2answers
99 views

ARM cancel execution of pre-empted interrupts

I can't seem to find an answer to this in google or the Definitive guide... Is it possible to from one interrupt, cancel the return to any pre-empted interrupts? For example, I have an ISR which is ...
1
vote
1answer
47 views

What is the danger of using interrupt pre-emption in ARM

I am working on a system which uses about 4 interrupts. I can clearly define a priority from one to the other. For example, I feed SPI transfers with DMA requests and operate a USB interface which ...
1
vote
1answer
99 views

Input interrupt pin associated with TIMER1 on ATmega168

A few days ago I came across the source-code for this ATmega168 based Inductance Meter from Dan's Workshop Blog. Below is the code that I believe sets up an ATmega168 interrupt to measure an external ...
1
vote
0answers
71 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 ...