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
1
vote
1answer
42 views

Interrupt on Change in PIC16F18877 Not Triggered

I'm trying to trigger the interrupt service routine method in PIC16F18877 microcontroller, but the code never gets into the isr() method. Not sure what and where am i going wrong. Here is the code i'...
1
vote
2answers
55 views

Where should be defined a device specific ISR when making a static library?

Suppose I want to make a static library (.a file), which contains an ISR. That library should be used by many AVR MCUs, but each device has different ISR vector name, so it cannot be defined in .c ...
1
vote
1answer
44 views

STM8 TIM2 interrupt not taking place. What am I missing?

I've just started using STM8 microcontrollers, specifically the STM8S003F3P6 chip, in my own custom test board. The board works and I am able to blink an LED on PA3 without using an interrupt. However,...
1
vote
4answers
91 views

What happens if an interrupt callback execution is interrupted by the same interrupt?

I have a microsecond timer (generates interruption every microsecond) for which I implemented a "HAL_TIM_PeriodElapsedCallback" function. What occurs if the ...
2
votes
1answer
46 views

NVIC memory map ARM cortex M3 STM32f103

I do not understand the following memory map regarding the NVIC registers in Programming Manual for STM32f103 page 129. It says that the offset address for NVIC_IPR0 is 0x300 and that of NVIC_IPR20 is ...
4
votes
3answers
456 views

Interrupt control in STM32

I am trying to learn about STM32 programming. I started to read some references before start the programming. I am currently reading this ST presentation. It says: When an interrupt request ...
0
votes
1answer
93 views

Using pointer of a function's returned value

I would like to know if there are possibilities to change the following code: ...
1
vote
1answer
66 views

UART receive detection

I am working with UART and I want to do something but could not achieve myself. I want to enter an interrupt when the data receive stops, i.e when I unplug the cable, do something only once and then ...
0
votes
1answer
76 views

Thread-Style Operation on Microprocessor

This is a general question about designing firmware for AVR microcontrollers, say, the AtMega16. I have a routine that I am running through several thousand times per second. The routine is entirely ...
-1
votes
2answers
64 views

Why polling works rather than interrupts [closed]

I have several devices like for example connecting with ESP8266. I have tried to use the SPI with it with STM32F4. First I have tried to work with SPI interrupts, the result of the communication is ...
2
votes
0answers
64 views

Pulses counting problem from npn proximity with interrupts in arduino

I am interfacing an open output npn proximity sensor with Arduino nano. I have used very silly approach of voltage divider as I was not sure that in open output sensor you can get whatever voltage you ...
0
votes
2answers
72 views

What is the difference between IQRn 0 and IRQn 1?

I am using STM32CubeMX to program my chip. Essentially I have a timer that i am trying to set to one ms, and every time that timer reaches a ms I want to toggle a pin. My question is that does it ...
0
votes
2answers
88 views

thoughts on reading only one changing GPIO with accurate time amoung huge number of digital Inputs

I am trying to read a huge number of digital inputs (129 to 800 and maybe more) at the same time. the sampling rate should be around 500K samples per second but I only need to read one of these inputs ...
0
votes
0answers
37 views

MEGA2560 only starts program after pressing RESET button multiple times

I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are ...
0
votes
1answer
55 views

DIGISPARK stops responding after few days [on hold]

I have DIGISPARK running on 4 AA batteries (measured voltage is 5.3V). What it does, is that it sleeps most of the time. RTC wakes it up usin PinChange interrupts, and then it turns ON pin 4 for ...
0
votes
1answer
65 views

DMA, Interrupt and UART connection in STM32 for detecting chararcters

I am trying to make a project and am planning to use DMA for my UART from one STM32 to another STM32. Here are some details of what am I using: Chip: STM32F107RB debugger and programmer: Atollic for ...
0
votes
1answer
39 views

Tasks inside Interrupt Handler

Is there any schedular that exists for STM32F103 in which the 'tasks' are run at the ISR() level while the Schedular() code runs in the main() thread?
0
votes
0answers
20 views

digispark + pcf8563 RTC interrupt not working

I have PCF8563 WAVESHARE board connected to DIGISPARK via I2C. Here is the code: ...
2
votes
1answer
138 views

single or multiple interrupt handlers in stm32

I am coming from 8-bit world to 32-bit world specifically stm32f103. At present I am only doing study and discussion with my fellows to know the major differences in the two worlds and also to select ...
2
votes
1answer
140 views

CPU Utilization Methods

To fulfill customer expentations and fill out customer reports about the device, is there also one section about CPU Utilization. Because I have never done such task before I have overview some "...
0
votes
3answers
43 views

Interrupt generating circuit: 0 ~ +3.3 V

For the purpose of testing a MCU and it's interrupt handling I want to design a circuit to generate interrupts. Ideally I would use a relaxation oscillator, but my supply is constrained to 0V and +3....
0
votes
1answer
74 views

timer interrupt on STM32F303

I'm kind of a newbie so excuse me if this is a beginner's question. tried to find an answer but couldn't find one. I'm working on STM32f3Discovery eval board, with the stm32f303vc on it. The code ...
0
votes
0answers
36 views

Calling a function that uses HW_Delay inside timer interrupt

I have the following timer interrupt configuration ...
0
votes
0answers
86 views

PIC timer1 interrupt never occurs

I am trying to use timer1 interrupt on PIC18F26K83. I use Micro C as compiler. So I set my timer for 30 ms and after that 30 ms, it is supposed to enter an interrupt and light the LED. But it never ...
1
vote
2answers
124 views

PIC interrupt on change never enters the interrupt routine

Hello I am using PIC18F26K83 and I have a button on RC7 pin. That is why I cannot use a normal interrupt. But according to datasheet interrupt on change can be used in this pin. I could not make it ...
2
votes
0answers
71 views

How to implement multiple functions on single push button

I am using a STM32 Nucleo MCU and trying to pull a multi-function single-button method. I need a way to implement this form of functionality for a single push-button: Push 1: function 1 Push 2: ...
0
votes
0answers
22 views

How to disable port2 interrupt when port 1 interrupt is active?

I am using MSP430G2553 with IAR. I would like to make an IR communication system which has a transmitter-receiver on both sides. When I try to send my signal, the receiver on the opposite can't ...
0
votes
0answers
62 views

Can't use the Wake-on-Motion functionality of an MPU9250 with STM32

Hi there :) I'm trying to use the Wake-on-Motion functionality of this particular MEMS (MPU9250) with my STM32L152C-Discovery board: if the MPU9250 sense a motion, the INT pin will be high. To achieve ...
1
vote
0answers
65 views

STM32F042 ADC Interrupt with STMCUBEMX

I need to read 15 channels ADC. However my MCU is specific named STM32F042K6T6. I decided to use an analog MUX to read every channel from just one pin. But, I didn't read accurately the datas by ...
0
votes
2answers
347 views

STM32 EXTI does not trigger interrupt

I am working on a device with a button that is supposed to turn it on (when pressed briefly) and off (when held longer). The MCU is an STM32L432. The button is connected to PB0. I want to use EXTI as ...
0
votes
1answer
88 views

Microcontrollers (STM32) and GPIO with momentary buttons

I have six momentary buttons and an STM32 Discovery board. I want to check the button presses. As far as I understand, I create a continuous loop that will check each GPIO consecutively. (I am aware ...
-1
votes
1answer
96 views

STM32 interrupt from Matlab Code

I'm using the STM32 MAT plugin and embedded coder for Simulink to generate C-Code out of my models to compile them onto an STM32F4. As IDE I use TrueStudio and for my MCU Configuration I use CubeMX. ...
0
votes
1answer
62 views

Identifying unhandled interrupt

I stopped in the middle of debugging a very simple project where I send "hello world\r\n" every couple seconds out of USART2. The first print hits the console and then I hang in an infinite loop ...
3
votes
2answers
823 views

How to configure DMA to receive variable length USART messages?

I am trying to receive USART messages on a microcontroller originating from PC which will command it to execute certain tests. I am using STM32F4, I chose to use DMA as messages on the same USART ...
0
votes
1answer
32 views

interrupt-on-change on 8051 microcontroller

I am trying to read the speed or number of rotations pulses of a self-made encoder motor. I am using an AT89C52 microcontroller. It gives external interrupt on rising or falling edge. How can I ...
2
votes
3answers
105 views

PIC IOC vs INT and the interrupt function

I am using PIC18F26K83 and I want to use interrupts for a switch that will be connected to one of the pins of my PIC. So I have some related questions: There are 2 interrupt options in PIC18F26K83: ...
0
votes
0answers
29 views

Using an MCP23017 port expander with momentary and toggle switches

I have a Teensy 3.2 connected to and MCP23017, running the Adafruit MCP23017 library. This is setup on a breadboard to simulate being connected to a home-made pinball game. GPA0,1 and 2 connected to ...
1
vote
1answer
49 views

Low Jitter and Latency on signal trigger using WFI / WFE on STM32F405

I have a hobby project using a STM32F405 MCU, which is intended to respond to a fast clock signal (~1Mhz) connected to Pin 1 of GPIOA. For every transition of the input (both rising and falling), I ...
3
votes
1answer
149 views

Spark plug cable firing interrupts

I am building an electronic tachometer for an old motorbike (a moped). For RPM monitoring I have come up with a solution of painting part of magnet black and using a TCRT5000 reflective sensor which ...
0
votes
0answers
56 views

Big code in interrupt freezes main function

I'm writing firmware for an ATSAM4S (runs at 120 MHz)and I noticed a strange issue with ADC interrupt handler. I set up ADC at 20 MHz, 5 enabled channels, and DMA transfer complete interrupt. ...
2
votes
2answers
178 views

STM32 CAN bus Rx interrupt only triggers in loopback mode

I'm designing the CAN interface for a STM32F042C4T6 to be able to receive and send messages. I've tested my code and everything seems to work perfectly fine in loopback mode. However, when I hook up ...
0
votes
0answers
13 views

Can anyone Explain me why nVICFIQIN is taken as input and ORed with FIQSTATUS and the output is negated to produce nVICFIQ

I am trying to learn VIC in Lpc2148. As you can clearly see the arrow in the picture. The nVICFIQIN is given as input to a OR gate and is ORed with FIQSTATUS register the result is then negated and ...
1
vote
1answer
95 views

Breakpoint Alters PIO Interrupt Behavior - ATSAMV71

So I'm baffled by this... I'm working with an ARMv7-M microcontroller and GCC compiler, debugging some code where I'm trying to enable an interrupt. I'm trying to do the following: enable an ...
2
votes
4answers
296 views

Cortex M3 reset handler with vector table relocation

I have a system with an STM32F103, which has a bootloader and a main app. Now, the main app is offset from the beginning of the flash to make room for the bootloader, and on cold boot the firmware is ...
0
votes
0answers
14 views

In PIC18F4550,But CCP1 Compare Interrput using Timer1 is not working in Relaese Mode but works if use debug mode with pause & Start

I am using PIC18f4550. I am using Timer0 for time keeping which alone works fine. I have tested CCP1 interrput using TImer1 for pulse generation. It also works fine. When I mergred Timer0 time ...
2
votes
1answer
200 views

ARM Cortex-M3 Interrupts and Interrupt service routine &interrupt handler

I am trying to understand arm architecture and i got stuck with one concept, i.e, INTERRUPT SERVICE ROUTINE. I had gone NVIC structure for HARDWARE & SOFTWARE interrupts. But at some point i got ...
0
votes
2answers
195 views

Using Character Match functionality in a STM32F7 chip

I'm trying to implement a UART receiver that works by finding a '\0' in the datastream, OR when it receives 256 characters at which point the data should be processed by an interrupt. The point is to ...
0
votes
3answers
71 views

Really occasional malfunction of the Schmitt-trigger input

I'm using some Schmitt-trigger inputs for debouncing the interrupt problems. Referring to above circuit, the circuit has a RC circuit and the output of the RC circuit goes to the Schmitt-trigger IC(...
0
votes
1answer
292 views

STM32F7: activate USART Receiver Timeout Interrupt (USART_RTOR.RTOF)

I want the STM32F769NI to generate an interrupt when a pause after a received byte on USART6 was detected. I cofigured USART6 with 9600 baud in asynchronous mode and enabled the receiver interrupt ...
0
votes
1answer
58 views

USART ISR on TXC breaking delays from <util/delay.h>?

I am trying to work out USART ISR's on the ATmega 328P. So far I have got the USART rx and tx working. I have come across a strange issue when it comes to the UART ISR's, though. The ISR seems to ...