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
0
votes
2answers
980 views

STM32 - more buttons pressed interrupt

I am using STM32L433CCT6 and I am programming it with eclipse and code genereted by STM32CubeMX. I would like to ask you, if is possible to add iterrupt that will be called, if i press two (or more) ...
0
votes
0answers
364 views

Interrupt on falling edge PIC16F877

The PIC is supplied at 3.3V and clocked at 16kHz. For this part of the design I need the external interrupt to trigger on the falling edge of a 100Hz square wave signal on RB0 and toggle the state of ...
1
vote
2answers
706 views

Interrupt Priorities- What does it actually mean?

I have one generic question regarding interrupts. My software has 2 interrupts,lets say interrupt_x (timer), interrupt_y(spi). Both interrupt has its own ISR. Interrupt_x has higher priority than ...
1
vote
1answer
323 views

Why is Atmega324pb pin change interrupt not firing even though input is changing?

For some reason my pin change interrupts are not triggered on my Atmega324PB. To test, I'm using an eval board and connecting an output pin to a pin configured to trigger a pin change interrupt. Is ...
1
vote
1answer
622 views

How to reliably update duty cycle to PWM on arduino due with SAM3XE

I have arduino due, which has Atmel SAM3XE MCU. I want to generate PWM signal and I want to change duty cycle every cycle of PWM reliably so i can generate output signal such as sine on output pin. ...
1
vote
3answers
395 views

Does using a software delay() function have greater power consumption than using a System Timer interrupt? [closed]

I had a discussion with someone about using a software delay(), and how it just executes NOP commands for a specified number of clock cycles according to your delay, and thus is constantly running and ...
1
vote
0answers
160 views

MCU wakes up from sleep periodically

I'm facing a weird behavior on SOME boards based upon CC3220SF. Scenario I have 20 units of my custom PCB, designed following the Design Reference Guidelines from Texas Instruments and - like they ...
0
votes
2answers
151 views

will For loop in MikroC for dspic block the interrupt service routine?

I am using MikroC for dspic30f4011. I am using a Timer3 interrupt for ADC reading. In this Interrupt services routine, I am reading ADC values. In Void main, where I need some delay in the instruction ...
0
votes
1answer
279 views

USART not entering ISR STM32F030C8

I'm working on UART using interrupts on Stm32F030 controller. I have done the following init. ...
1
vote
1answer
4k views

How to add external GPIO interrupts on STM32?

I'm trying to configure STM32CubeMx to external GPIO interrupts, however, in the NVIC screen I don't see an EXTI... interrupt to be set. What should I do to be able to e.g. check for interrupts on ...
-2
votes
1answer
74 views

Counting slow to fast in a microcontroller.(Ramp)

I want to make an increment(++) to a variable initially slowly then speed up linearly. For example, using a timer interrupt(every 1 sec) in increase the variable x by 1.so at first variable get ...
1
vote
1answer
1k views

STM32L031 Nucleo USART Problem

I have a problem with STM32L031 Nucleo board USART communication. I am trying to send data to PC on USART periodically and catch the spesific character ('a') with Rx interrupt and toggle the onboard ...
1
vote
2answers
3k views

USART interrupt not working as expected [STM32 Nucleo]

could someone explain why i can only receive 13 chars with USART interrupt? I use '\n' to detect the end of string. ...
1
vote
1answer
5k views

How to dynamically adjust a timer with STM32

I've got this timer (TIM4) that's in PWM mode. I'm outputting one PWM channel and i want to wait a bit, and then grab the latest ADC samples from a DMA conversion. TIM4 -> ARR is 4096 TIM4 -> CCR1 ...
1
vote
2answers
148 views

Embedded system task scheduling for data aquisition on a CAN network

I'm struggling with the concept of how to schedule my tasks. My Setup: STM32F103 hooked up on CAN. Taking measurements with a Lidar V3 module comms via I2C, then distributing that measurement on the ...
1
vote
1answer
154 views

How to reset / clear IRQ requests in AX5043

Has anyone gained experience with Onsemi's RF Transceiver AX5043?! I'm not able to clear the interrupt request Bits. For example my XTALREADY interrupt is fired immediately after reset and fired again ...
0
votes
1answer
48 views

Generate pulse when any of inputs changes

I have a microcontroller with only one pin left which supports external interrupts. It is supporting 3 encoders which outputs can generate either rising or falling edge. I would like to find the way ...
0
votes
2answers
449 views

Interrupt vector address in Program Counter?

Second image illustrates the process of interrupt service entry in ARM TM123GH6PM (using GPIO port C as an example), as you see, it took the vector address of port C handler and put it in PC (you can ...
1
vote
1answer
1k views

debounce filter vs glitch filter [closed]

What is the difference between debounce filter and glitch filter on a mcu? I'm trying to implement a hardware debounce filtering on a ATSAM4S4C (ATMEL SAM CORTEX-M4 - PAGE 575. http://ww1.microchip....
1
vote
1answer
625 views

AVR pin change interrupt

I want to turn on LEDs 0, 1 and 2 when pinc1, pinc2 and pinc3 are triggered. Also, I want to use a pin change interrupt. Problem: only LED 1 is on. This is my code and I am using atmega328p and ...
1
vote
0answers
180 views

Interrupt priority in STM32F103RB

I got a doubt about an interrupt grouping in stm32f103. In programming manual of microcontroller I found 5 ways to configure it. But, while debugging, I found 8 ways. How is it possible to get ...
0
votes
2answers
589 views

External Interrupt delayed to in STM31F103C8

I have to write a C program to toggle an LED using an external interrupt on STM32F103(72MHz System Clock). I have initialized EXTI3 on the Falling edge and the ISR Handler toggles an led at high ...
5
votes
1answer
1k views

Altera Cyclone V - Linux & FPGA interrupt handling

I need to propagate an interrupt from my custom FPGA IP core to the HPS system of a DE0_nano_SoC (Cyclone V HPS-FPGA architecture) and handle in Linux. I have googled quite a lot to confidently say ...
0
votes
1answer
220 views

why doesn't this code receive string ?(it just receive the first character)

I want to receive a string whit atmega8 that is sent by another atmega8. The sender send string just one time, but in receiver just first character is received. I can't understand what is the problem? ...
2
votes
2answers
261 views

Length of an interrupt

I know that an interrupt should be as short as possible, however, what is short? My routine is quite long, but has quite some if-statements, so the execution time is short. But maybe it still is ...
0
votes
2answers
2k views

Possibility for UART receive data loss?

In a lot of examples using STM32, HAL, where UART data is received by interrupt the code looks like: Initially (to start the receiving): ...
0
votes
1answer
108 views

Secondary linear lamp circuit interrupter switch

Following on from this answer to a previous question from a while back, I want to add a new lamp (with its own button/switch). The new lamp should be controlled separately (i.e. not controlled or ...
2
votes
1answer
2k views

On which core on a multi core CPU is the ISR called?

When a multi core CPU is interrupted, the PC will be changed to point to the corresponding entry in the interrupt vector at the next instruction fetch. On a CPU having more than one core (e.g. modern ...
1
vote
1answer
1k views

stm32f0 uart1 rx interrupt

I have stm32f030f4p6 Microcontroller and using iar Compiler , library cmsis , After confige Uart1 the RXNE , FE and CMF bits return 1 whereas not recieve or send was done if I dont set RXNE bit to 0 ...
0
votes
1answer
494 views

GPIO external interrupt on LPC1769

I am working on GPIO external interrupt on LPC1769 board and having problems getting it to work. I have connected pin 2.11 to a push button and interrupt must be generated when the button is pushed. ...
2
votes
2answers
371 views

ATtiny13A's timer appears to be very inaccurate, is it normal? [closed]

I wrote this blink program for my ATtiny13A and tried to measure the accuracy with an Arduino Uno but the timer seems to be quite inaccurate. On the ATtiny I am running on the ...
1
vote
1answer
113 views

Are there any ways to improve this ISR - STM32F401RE?

I am currently coding a flight controller from scratch and am currently working on the module to decode the incoming PPM signal. Keeping in mind that this is an ISR, I've limited its functionality ...
1
vote
1answer
37 views

External interrupts to MCU from ADV7511

I am having situation that when I connect my monitor with ADV7511, it triggers interrupt (when hot plug detect happens) but more than one time, so I done debouncing. Problem is when I am unplugging ...
2
votes
2answers
330 views

FatFs f_write not working in LPC1788 Timer ISR

I’m using LPC1788 MCU with KeilV5 compiler. I Have a Timer ISR in which I read a value form specific ADC channel and write it into a SD-Card using FATFS library. Here is my Timer ISR code: ...
0
votes
1answer
1k views

How to set two timers running at the same time in atmega328p?

I want to set up two timers running two ISR-s with different resolutions. One timer for counting milliseconds for clock time, another for counting microseconds when ...
0
votes
1answer
412 views

How to use two timers for one interrupt vector on avr?

I want to use timer1 and timer2 for same vector TIMER#_COMPA_vect isr on atmega328p. Idea is to start and stop one when requested, for time sensitive functions. And ...
0
votes
1answer
89 views

PIC capture interrupt not triggering at 0.65v

I connected pulse input to CCP1 pin( capture1 pin), maximum and minimum volt of pulse is 2.5v and 0.65v interrupt setted on falling edge problem is, interrupt not triggering at 0.65v but when I ...
2
votes
2answers
105 views

How to detect and measure a step change in resistance

I replaced my car stereo with a Raspberry Pi 3 and the 7" touch screen. Everything's working nicely, but now I want to hook up the volume control buttons on the steering wheel to the Pi. The buttons ...
2
votes
1answer
72 views

PIC32MX320F128H shadow set corruption for a function while interrupted

Update 1 the problem vanished when I changed the way of context switching during interrupt from srs to soft #pragma interrupt InterruptHandler ipl1srs vector 0 ...
7
votes
2answers
6k views

What's the difference between setting SysTick Interrupt in NVIC and using it as an exception?

I'm using an STM32F303 MCU and I've noticed that the SysTick can be set up to cause an exception, which seems to mentioned quite often in various User Guides. This way, it will have a priority level ...
3
votes
1answer
8k views

STM32F4 HAL Library Button Interrupt

I'm trying to toggle built in LED with external interrupt instead of while loop. Probably I'm doing something wrong with EXTI functions. Can you help me to fix it? ...
0
votes
1answer
57 views

Incomprehensible high level interrupt behaviour

I am a newbie and trying understand how high level interrupts are handled by a microcontroller. I am using a LPC1347 with Cortex M3 CPU. I understand how edge interrupts works but level interrupts has ...
1
vote
1answer
637 views

ADC Interrupt usage

I'm using a dsPIC30F4011 in my project with XC16, and I'm currently programming its ADC. But my question is also general: Do I have to turn off and then back on the peripheral (ADC in this case) in ...
2
votes
1answer
211 views

PIC24FJ256GA410, UART interrupt, freeze after enable

I'm fairly new to PIC and MCUs. My board has PIC24FJ256GA410 MCU with external 3.6864 MHz crystal. I'd like to use UART1 for debugging purposes. Below is my main() ...
13
votes
6answers
8k views

Avoiding global variables when using interrupts in embedded systems

Is there a good way of implementing communication between an ISR and the rest of the program for an embedded system which avoids global variables? It seems that the general pattern is to have a ...
5
votes
1answer
492 views

How do I interrupt an ISR with a higher-priority ISR on an STM32F105?

I have two external interrupt sources coming into an STM32F105. I want one of them (call it "IRQHigh") to pre-empt the other ("IRQLow"). Currently, if IRQHigh is triggered during the IRQLow ISR, the ...
0
votes
1answer
147 views

Raspberry C code getting stuck due to infinite for loop

I am new to raspberry pi (Raspbian). Any guidance in the matter will be appreciated! I have written a C code which includes C Filehandling & wiringPi.h library for GPIO manipulations. I have ...
0
votes
1answer
70 views

PIC16F1776 interrupt triggered with no evident source

I have a Microchip PIC161776 running at 32 MHz. Interrupt Code has been generated with MCC, with the preemptive option set. typically, about once every hour the interrupt routine gets called with no ...
0
votes
1answer
2k views

UART on PIC16F1829 - RCIF Interrupt for RX pin not working, cannot receive anything even with polling

Code is written in MPLABX v4.00 with XC8 compiler. I am new to writing firmware for 8-bit PICs and could use some help with my code. I am using a PIC16F1829 for an LED module which gets RX commands. ...
2
votes
2answers
567 views

Why aren't my interrupts nested in an ATSAM controller?

The interrupt controller of an ATSAMD21 (based on a Cortex-M0+) is called NVIC (Nested Vector Interrupt controller), so I was hoping it would be easy to nest interrupts. The documentation doesn't ...

1 2 3
4
5
14