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)

5
votes
3answers
361 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
36 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
85 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 ...
0
votes
1answer
101 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
116 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
59 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 ...
1
vote
1answer
53 views

Connecting Open-Drain inputs or outputs together with one resistor

I had a couple of quick questions. I am designing a board using 10 IO expanders which I'll use as inputs. Each has an !INT pin which is open drain and pulled high to 5v through a resistor. Can I ...
4
votes
1answer
53 views

AVR: Timer overflow flag in TIFR [duplicate]

I have a little question about the TOVn flag located in the TIFRn register. The datasheet says, if the ...
0
votes
1answer
61 views

PIC 16F877A interrupt handling [closed]

I am trying to write a simple code to receive and resend data using USART but the code is not working. Could someone give suggestions on possible flaws in the code? I am using USART at baud rate ...
0
votes
0answers
17 views

Requesting help with periodic sampling of Capture with PIC18 microcontroller

I am using MPlab C18, and PIC18f4520 to make a motor controller with negative feedback. I measure period using CCP2, which I have reconfigured to use the alternate input pin (RB3), and this uses ...
0
votes
2answers
90 views

PIC24F UART Rx Interrupt not firing

I am currently trying to write code for a 48 channel DMX controlled dimmer using a PIC24FJ32GA002. Using a scope I have confirmed that there is a DMX signal reaching the Rx pin of the UART which has ...
1
vote
1answer
142 views

dsPIC33E comparator interrupt doesn't occur

I'm currently trying to get the comparator on dsPIC33EP256GP502 works, but get stuck in the comparator interrupt. Basically what i want to do is just using the comparator to compare two external ...
0
votes
0answers
35 views

Nested Vector Interrupt between USB interrupt and pin interrupt scheduling

I am making a software SPI for a sensor with stm32f072 microcontroller. I have to display it in PC and am using USB protocol for this. While sending data from sensor to USB is completely alright. But ...
7
votes
1answer
270 views

How does the call stack operated during an interrupt on AVR?

(Specific to the Arduino Uno...) What happens to the stack when an interrupt occurs on an AVR microcontroller and I call a function? Does the compiler inline the code? Does it cache the stack ...
2
votes
1answer
62 views

MCU pull down input push button with interrupt ESD issue

I have an MCU operated at 3 volt with an input pin that is floating by default. I have an external pull down circuit with a 10K resistor connected to the I/O pin. I also have it tied to VCC using a ...
0
votes
2answers
72 views

Is the nRF24L01 IRQ line open-collector?

I need to know whether the nRF24L01(+) has an open-collector IRQ output, or a full push-pull driver. The datasheet doesn't mention this fact. The reason is that I'm working on a circuit involving two ...
1
vote
1answer
86 views

Processing SPI transactions using interrupts

I'm wondering what the best way to handle SPI transactions when using interrupts is. I'm about to write my SPI interface code to an external flash part using a PIC. I'm going to use interrupts and ...
3
votes
1answer
97 views

STM32F0 Interrupt Debugging

Issue: I'm having an impossible time debugging why one of my interrupts isn't working. I'm trying to setup a hardware interrupt on PA3, but as soon as I initialize it, the interrupt triggers and then ...
0
votes
1answer
61 views

Context switching and systick handling on the STM32F series

I am using a STM32F407 board to build my own tiny RTOS and I have some questions. How can I define my own stack in different memory location, so I can have one stack for each queue of tasks? How do ...
0
votes
1answer
98 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
708 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 ...
3
votes
1answer
104 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
54 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
91 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
291 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
66 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
239 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
72 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
70 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
62 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
45 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
69 views

Choice of the appopriate conditional statement

I'm measuring the width of a PWM puls with the external interrupt: ...
4
votes
2answers
236 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
242 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
100 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
122 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
85 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 ...
1
vote
1answer
201 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
83 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
448 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
57 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
160 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
76 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
219 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
131 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
77 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
66 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
2answers
135 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
45 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 ...