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
8
votes
2answers
25k views

Clearing USART (UART) interrupt flags in an STM32?

I am using an STM32F105 to communicate with a Linx GPS chip using a UART. If I don't use interrupts (if I just poll the RX flag) then it works just fine. But I'm getting unexpected results when ...
1
vote
1answer
1k views

MSP430 Problem with Multiple Interrupt Timers

I am currently investigating the use of pulse density modulation (PDM) combined PWM (In short, PDM-PWM) as a substitute for conventional PWM in the application of maximum power point tracking (MPPT) ...
0
votes
2answers
944 views

Detecting interrupt on Atmega8 from zero crossing detector circuit

I have a zero crossing detector circuit, whose output I am providing to my Atmega8 as an interrupt, but unfortunately its not working. If I use DC supply 5V (logic 1) as an interrupt, it works. Where ...
3
votes
1answer
828 views

AVR external interrupt triggering by the falling edge: for how long should I keep signal low to guarantee triggering?

The question header appeared to bee too long. I'm sorry for that. So I have a schematic generating a short LOW on INT0 pin of ATmega48PA. From the simulation I figured out that the LOW level will be ...
4
votes
2answers
1k views

ISR, volatile and ATOMIC_BLOCK

From my experience so far I am aware of the following to pay attention to when working with ISRs: An ISR should complete quickly Variables shared between an ISR and the main execution path should be ...
18
votes
2answers
2k views

Should all traps always be defined?

I've seen two cases now with dsPIC 30F4013 where the controller was resetting due to an undefined trap. Why these traps were getting raised in the first place is still a mystery, but that's not my ...
0
votes
2answers
335 views

CAN -> acceptance filter then interrupt or vice versa

I would like to know which occurs first while using CAN communication. Based on the answer I would conclude whether an acceptance filter must be used in my project or not. Scenario: There are three ...
2
votes
2answers
706 views

Serial Communication Rx ISR logic design

If im not wrong, an ISR is supposed to do minimal processing when it receives a data serially(via UART). Im planning on implementing such a protocol for communication between 2 systems via uart. This ...
0
votes
2answers
192 views

PIC16 10hz timer with timer1 and 1Mhz clock

I need to increment a stopwatch at 10hz using timer1 on a PIC16F628. The external clock is 1Mhz, supplied by a packaged oscillator (EPSON sg8002db). With no prescaler, the value to set the timer to (I ...
1
vote
0answers
646 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 ...
0
votes
1answer
937 views

MCU External Interrupt False Triggering

Above is the picture describing the configuration outside the MCU. Vin is 0 to 5V Peak to Peak square wave which may have 0 to 50 KHz frequency, or even higher. The MCU is supposed to handle ...
0
votes
2answers
74 views

Why are INTERRUPT CONTROLLER SPECIAL REGISTERS in arm different from others? [closed]

For example, in s3c2440, it clears only the bit positions of the SRCPND corresponding to those set to one in the data. The bit positions corresponding to those that are set to 0 in the data remains as ...
1
vote
2answers
525 views

Why does my RTC generate interrupts faster than once per second?

I have configured an RTC module on a uC to generate interrupts every second (~32 kHz module clock with a 0x7FFF prescaler in between the counter and the clock - I hope so, seems like ~32k is the ...
0
votes
2answers
577 views

STM32F407ZET6 and nordic nrf24l01+ communication with interrupt driven SPI

Currently working on STM32F407ZET6 MCU. I am trying to generate an interrupt based SPI communication with nordic nrf24l01+ chipset. The MCU is in Master mode. I am able to establish an SPI ...
2
votes
1answer
1k views

Rx data rate on CAN bus faster than polling rate

I'm working on a safety-critical SIL 4 system and so interrupts have to be kept to a bare minimum (hence using only timer interrupts). CAN is used in polling mode. Suppose data arrives at a CAN node ...
-1
votes
1answer
392 views

Interrupt INT0 on PIC32MX110F016 not working

I am trying to put the INT0 working in a PIC32MX110F016 but it seems it never goes there. The INTO pin is Electrically powered with a pull-up resistor and when I press a tactile button it goes from ...
1
vote
1answer
223 views

PIC32mx Timer5 not working

I am struggling to put my Timer5 working properly. I think I have enabled all the registers but the interrupt never occurs. I already put a break point inside in the ...
0
votes
1answer
1k views

Beagle Bone Black interrupts for optical encoder

I'm trying to have my optical encoder work on interrupts. I found some resources online that discuss it but they all seem to be based on an older version of debian since the files and folders in "/sys/...
0
votes
1answer
479 views

Bit Banging UART PIC32mx

I am trying to bit banging an UART Port using PIC32MX with timer5 (the only available at this time) but I am struggling how to configure the timer for a Baud Rate of 115200bps. I don't want a flow ...
7
votes
2answers
12k views

STM32F7 gets stuck in external interrupt callback function

i am working on a project to connect a camera to an STM32F7 Discovery board using the DCMI interface. The camera part works fine, but i have a strange problem with external interrupts from the ...
0
votes
2answers
2k views

Disable interrupt in ISR on STM32F4

Is is possible to disable an interruption during its service routine to prevent it from happening again for some time? For example: ...
1
vote
2answers
2k views

How to distinguish between a read and a write in a Harmony USART BufferEventHandler?

I would like to use the Harmony USART driver on a PIC32MX695F512H using interrupts and with buffer support. After setting the appropriate settings in the MPLAB Harmony Configurator, the system has ...
1
vote
1answer
122 views

Latching battery switch triggered by interrupts

I've got an accelerometer with a couple interrupt pins and I've figured out how to get it to fire its interrupts on any change in acceleration or lack thereof for a given duration. What I want to do ...
1
vote
3answers
5k views

How to simplify UART interrupt handlers on Tiva TM4C with SIMcom 900

UARTIntHandler0 interfaces to the USB UART for debugging. UARTIntHandler1 interfaces to the SIM900 GSM module. The purpose of ...
13
votes
4answers
2k views

AVR SEI instruction

The AVR SEI instruction (http://www.atmel.com/webdoc/avrassembler/avrassembler.wb_SEI.html) waits for the next instruction to finish before enabling interrupts. If I use another instruction to set ...
0
votes
1answer
2k views

How to remove noise signal on the interrupt pin of micro controller [closed]

My system is interrupt driven, but sometime due to noise signal generates, micro controller treats this signal as an interrupt which is wrong so how can I remove that signal and allow controller to ...
0
votes
1answer
170 views

Is it possible to get two low-voltage interrupts pins on a Atmega328?

Caution: Noob at work :) I'm trying to get one of two 1.5V-2V signal inputs to trigger an interrupt routine on an Atmega328 (Doc PDF). By using the analog comparator interrupt, I gather I block the ...
0
votes
3answers
294 views

Programmed IO vs interrupt for devices

Although I can understand the difference between programmed IO (PIO) and interrupt (INT) transfers, still there is something vague. In PIO, the processor repeatedly checks READY pin to see if the ...
2
votes
2answers
163 views

MSP430 how to make configurable ISRs in a module (Code composer studio C)

I have a question that I think the answer to is quite simple. But I've been unable to find a straight answer to. If i have this service routine in some module foo.c ...
0
votes
1answer
282 views

How to generate UART interrupt for GPIOs?

I am using PIC32 and I have few inputs. I want a UART Tx Interrupt to fire whenever any input becomes HIGH. I have somehow manged to write code for UART tx and rx ...
1
vote
3answers
670 views

Interrupt-on-Change occurs twice on PIC16F1825

I am having a mind blowing misbehaviour in my PIC16F1825. Basically I am using pin 3 (RA4) to toggle a LED using an Interrupt-on-Change. Problem is, although it toggles the led whenever I press the ...
1
vote
2answers
572 views

Why won't my phototransistor interrupt my microcontroller?

I bought a couple of phototransistors. They all have one lead shorter than the other. I assume that, like normal diodes, this means that the longer lead goes to V+ and the short end goes to GND. I ...
8
votes
1answer
1k views

enable/disable PCI interrupts

I'm implementing a PCIe driver, and I'd like to understand at what level the interrupts can be or should be enabled/disabled. I intentionally do not specify OS, as I'm assuming it should be relevant ...
1
vote
1answer
95 views

Enhanced 16F PIC: How many instruction periods does automatic_context_save require?

I am about to do my first design with an enhanced 16F PIC microcontroller. I have a question regarding automatic context save & restore that occurs when an Interrupt is triggered. Specifically, ...
1
vote
1answer
413 views

Sensor has interrupt pins. What can I connect them to?

I have a BMI055 gyroscope and accelerometer. on the sheet there is a section dedicated to the 4 interrupt pins (16,1,12,13 respective to 1,2,3, and 4). This section starts on page 30. and it seems ...
9
votes
2answers
16k views

STM32F4 Cube HAL UART. Is it a bug or am I missing something?

I am using interrupt based UART IO (no DMA). HAL_UART_Transmit_IT function sets EIE bit in ...
2
votes
1answer
2k views

practical use of NMI in Cortex-M3

So some Cortex-M3 CPUs (and most other small CPUs as well) have a non maskable interrupt. I know what the NMI does, but I don't quite understand why I ever would want to use one. I'm looking for ...
1
vote
1answer
268 views

Why interrupt is not triggered?

When pin RB5 changes between high and low it should trigger interrupt. Interrupt happens when IC gets powered and does not occur afterwards when RB5 gets connected or disconnected from vdd. Why so? I ...
2
votes
1answer
229 views

PIC ISR - check every interrupt source or just one?

I'm curious if there are any particular wins for using a call instead of a goto when checking each interrupt source in an ISR. My current code would do something like this: ...
1
vote
0answers
532 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
3answers
268 views

PIC24FV Reset without Flag

I am working on building an interrupt based program flow using the PIC24FV32KA302 module from Microchip. However, I am having some trouble with intermittent resets (it seems). I am currently using ...
1
vote
1answer
2k views

stm32 freezes during ADC

I am doing simple ADC test with potentiometer on STM32F103C8, it seems to work fine for 5 seconds or so, but then the whole uC just stops - even while loop stops doing what it is supposed to do(so I ...
1
vote
1answer
333 views

Interrupts in AVR

I'm using an atmega328 on AVR. I haven't done any coding yet but I am planning. How I will do so in my head. So I want to be able to wake up the ATmega328 via a button press, and go to sleep after I'...
1
vote
0answers
92 views

What happens after a page fault? [closed]

When a page fault occurs in a Linux system, the interrupt-handler has to figure out the reason why the page fault happened. But how ? Is there anywhere a special number for that !? If yes, where is ...
0
votes
1answer
237 views

Interrupt doesn't seem to reenable on PIC16F887

I'm building a timer using the PIC16F887, some push buttons, and seven-segment displays. I'm writing the code in assembly, and everything works great except the start/stop button which is handled as ...
-2
votes
1answer
418 views

What is the triggering level of INTR interrupt? [closed]

In the book we are told about the triggering level of other interrupts but I could not found any statements about the triggering level of INTR.please answer.
1
vote
2answers
320 views

Low-power interrupt generator

My objective is to generate an interrupt on an Atmega328P processor every second or so, using substantially less average current consumption than the inbuilt watchdog timer. You can see from the ...
2
votes
1answer
2k views

PIC24 Interrupt auto_psv vs no_auto_psv

I'm trying to understand the options when setting up an interrupt in a pic24fj128ga010. There in an attribute option for either auto_psv or no_auto_psv. I understand that PSV stands for program ...