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

Interrupts are firing when touching ground with metallic things

I'm making a circuit on a breadboard (before SMD design) for a battery-powered device. When USB is connected to any wall-adapter, the device wakes up when touching any ground wire on the breadboard ...
1
vote
1answer
47 views

Checking interrupt flags for UART data receiving and transmitting on STM32

I'm trying to develop a UART receiver/transmitter for an academic project. For now i developed the UART continuous data receiving part and it works quite well. Here is the code: Interrupt file: ...
0
votes
0answers
21 views

How can I add a SVCall handler to the Vector Table of a CC2652 device

According to the CC26xx Driver Library documentation there are two options for adding interrupt handlers, one dynamically and one statically. The static registration of handlers seems to be the ...
0
votes
1answer
26 views

in AVR, if i use .ORG 0 with the main program , where is the interrupt vector table and .INCLUDE file data go?

I am studying AVR from the book "the AVR microcontroller and Embedded system by Mohamed mazidi" and "atmega32A data sheet" in the book, it puts samples of cade which start like this ...
0
votes
2answers
51 views

Implicit declaration is invalid warning for __set_BASEPRI() function in Keil

I'm trying to use a __set_BASEPRI() function in Keil to set up interrupts in STM32F407 but it doesn't work when I compile the code and the IDE shows warning "...
0
votes
1answer
56 views

Which ASCII character could interrupt communication?

Which ASCII character could interrupt or terminate or otherwise disturb communication on the reciever part. Not including acknowledgment, handshakes, identification or other programmed protocols. ...
0
votes
2answers
49 views

Verilog design question: How to generate internal interrupts without delay?

I made a single-cycle RISC CPU in Verilog, and it works well on a real FPGA I have. It has multiple components that communicate over an internal bus. One of these components is a programmable timer, ...
0
votes
0answers
49 views

Unexpected result reading pin on clock rising interrupt

What I try to achieve is a simple one-way communication between two MCU's (ATTiny85's to be exact) at 16Mhz. This is just a start, to figure out it can be useful, very basic and needs to be very basic....
1
vote
1answer
34 views

PIC 18F2550 External Interrupt Problem

I am working on a basic PIC based circuit to improve myself. What I want to do is to make LED's on one by one, every time I press the push button. I am using external interrupt to do this.However, I ...
0
votes
0answers
22 views

Pullup Rise Time On AVR External Interrupt

Background I am designing a simple lamp dimmer using the Atmel ATTiny441 microcontroller. To this end, I have designed a very basic zero-cross detector which feeds the external interrupt pin (INT0) ...
0
votes
4answers
87 views

Change state hardware interrupt handled by micro-controllers

How are external interrupts handled by microcontrollers? My question is general to micro-controllers, but if it is architecture specific, leans to ARM- based micro-controllers. Assuming we have 2 ...
0
votes
1answer
42 views

Problem with ADC configuration - atmega328p

What's up folks? I've been developing a project using atmega328p and avr-gcc. Recently, I've tried to configure the ADC to single sample. The codes below show my main.c, ADC.c and ADC.h ...
0
votes
1answer
20 views

ATSAM4E UART1 interrupt not working

I am working on ATSAM4E8C on custom board. The uart0 and its interrupt is working fine but while on uart1 I faced an strange issue. The uart1 is sending the data but interrupt handler is not calling ...
0
votes
1answer
47 views

STM32F411 - Timer interrupt not firing

I setup TIM3 on my STM32F411 using the following code: ...
0
votes
0answers
36 views

FM4 interrupt only once

I've bought an FM4-176L-S6E2GM board and successfully run the board example projects. Now I would like to modify the s6e2gm_I2S_hp project in order to continually stream a a buffer using interrupts ...
1
vote
3answers
104 views

Accessing structures concurrently modified by ISR

I have the the following situation: An STM32L476RG (ARM Cortex M4F @ 80MHz, 1MB Flash, 128kB RAM) parses some string data coming in over UART. The project uses mbed-os. The parsing of the data is done ...
0
votes
2answers
82 views

Internally Pulled-Up signal on STM32 interrupt pin? [closed]

I used 2 pins of STM32F103C8T6 as button interrupt which is both located on GPIOA port and 12 & 15 pins. the code compiled and loaded to the board successfully using STM32cubeIDE. One of the input ...
0
votes
0answers
119 views

STM32 - HAL SPI receive interrupt not entering EXTI callback

I designed a breakout board for the STM32F401CEU6. (Schematic attached) I am using it to receive data from an ADC chip over SPI. The ADC chip has a data ready output which should be used as an ...
1
vote
1answer
67 views

ESP32 Sample a 1kHz square wave (10%-90% duty cycle) with analogRead()

I need to sample the peak voltage of a 1kHz square wave. The duty cycle varies between 10% and 90%. I am using an ESP32 and hoped to use analogRead() to sample the data. My first idea was to attach ...
0
votes
0answers
66 views

STM32 __HAL_TIM_GET_FLAG vs. __HAL_TIM_GET_IT_SOURCE and how doing without (CMSIS)

I'm trying to configure a timer (on STM32F0 but I guess it's the same on the rest of the STM32F family) with Output Compare to get an interrupt for two different actions at two different time ...
0
votes
0answers
33 views

Touchscreen keeps failing to communicate with raspberry pi, except when I touch the INT pin

I bought a display with a i2c touchscreen from Aliexpress and hooked it up to my Raspberry Pi 3b+. The screen part works fine, however, the touchscreen part is flaky. When I just boot the pi, the ...
15
votes
11answers
4k views

Why should interrupts be short in a well configured system?

Why should interrupts be short? I'm currently using STM32 and it has a feature of prioritizing interrupts. Because of that, I don't see any difference between these two options: the main loop and ...
1
vote
1answer
69 views

STM32 UART: combining interrupt and DMA modes

I am trying to use UART3 of STM32F103K8 to rx data in interrupt mode and tx in DMA mode. Reception works well, but transmission ...
2
votes
2answers
50 views

PIC when generating a PWM signal does the used timer throw a overflow interrupt flag?

I'm trying to make a 10kHz PWM signal with a PIC18f25k50. Which is generated like the following diagram. I configured timer2 at 750kHz which means if I set PR2 ...
3
votes
2answers
320 views

Reading interrupt safe ring buffer

I have a piece of code here that was generated by Atmel START Wizard. It setups a UART and it also creates a ring buffer for reading data. This is the code that reads data from the buffer: ...
0
votes
0answers
31 views

ATmega328p: Does SPI conflict with timers TC1, TC2 or interrupts PCINT2, PCINT0?

My code - based on my library MultiTrans - uses timers TC1 and TC2 as well as interrupts ...
1
vote
3answers
176 views

Counting pulses using Arduino Uno

I am trying to count pulses from a waveform generator using an Arduino Uno. The waveform generator is set at the following settings: Waveform Type: Pulse Freq: 20 Hz (50ms) Amplitude: 3.0 Vpp Offset: ...
0
votes
1answer
70 views

Master SW (bit-bang) I2C with Interrupts?

I've written a set of "bit-bang" software routines for the PIC18F2620 device. These routines work well for reading and writing 24LC256 EEPROM and DS1307 RTCC devices for the most part. (I wrote this ...
0
votes
1answer
137 views

timer input capture for really low frequencies

How low of a frequency can a timer be used to measure an external signal in "input capture" mode? If I need to measure something that has a frequency of say 1hz - 2hz... or even slower for that ...
0
votes
1answer
129 views

STM32: Interrupt latency for serial protocol implementation

I am implementing a synchronous serial interface (SDLC) using an STM32. My original implementation for the RX side is running on a ARM7 which uses the FIQ to set an interrupt on the clock line, in ...
1
vote
0answers
61 views

How to set registers of accelerometer BMA220?

I first wrote my problem in Arduino Stack exchange (https://arduino.stackexchange.com/questions/68438/how-to-manage-interrupt-from-accelerometer-bma220) but I was told that I might get a better help ...
3
votes
1answer
85 views

AVR diagram of functions calling, ISR and main loop share the same resource

I made a simple diagram of functions calls to illustrate the potential problem which bothering me a little. As you can see, my task_list (which is simple linked ...
1
vote
2answers
63 views

Non-reentrant Functions as Macros for utilities used in both Main and Interrupts

When compiling software with xc8 for a PIC which has functions which are called in both interrupts and in the main function the compiler gives an advisory: ...
0
votes
1answer
107 views

Arduino to Attiny841 with ATTinyCore — pins not working

I have code that works using Arduino. Because I wanted to size down the project, I replaced it with an Attiny841. Process: I soldered the 841 on an adapter and checked all pins using a multimeter ...
3
votes
1answer
105 views

Exiting interrupt routine in PIC16F18877

After executing the interrupt block, the execution halts and never returns out of the interrupt routine to the while(1) block in the main method. To check the functionality, I've written the below ...
1
vote
0answers
143 views

STM32 I2C Fast Mode Issue

Currently, I am implementing I2C communication with Interrupt. STM32 serves as the slave and Arduino serves the master. MCU: STM32L152RDT6 For previous work, I2C communication in standard mode is ...
0
votes
1answer
64 views

Do UART RX interrupts require support from the transmitter?

I'm trying to understand why I am seeing RX interrupts when tying RX to TX of my SAMR34 but not when I connect it to the transmitting device. The transmitting device notes the following restrictions: ...
1
vote
1answer
88 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
63 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
161 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
162 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
69 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
1k 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
102 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
76 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
77 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
72 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
101 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
245 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
90 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 ...

1
2 3 4 5
14