Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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 ...

0
votes
1answer
12 views

Interrupt during packet transfer

I'm using the mbed TCP/IP Socket library to receive incoming messages via ethernet. Currently, the incoming data is read in an infinite while(1) loop (i.e. as fast as possible). I will also be ...
0
votes
0answers
41 views

Providing an input event to timer to enter into ISR on Tiva Launchpad TM4C123GH6PM on Code Composer Studio

I am writing a program in CCS to count the time every positive edge from 32-bit wide timer, where the time is updated in the widetimer5's ISR on Code Composer Studio. I read the datasheet, but I am ...
2
votes
0answers
15 views

MikroC trigger interrupt in compiler

I am trying to test the interrupt function at home without a board to push buttons etc. I gave up on my code and copied an example but still cant make it work. Below is the sample code. In the while ...
0
votes
0answers
20 views

Does SoftwareSerial and the servo library produce interrupt conflicts? [migrated]

I'm planning a project that will involve multiple serial ports and the Arduino servo library. I have heard that this may cause interrupt conflicts. Are there any simple solutions to this
0
votes
3answers
49 views

Interrupt debouncer for switch sensor

I want to read the state of a switch sensor (magnetic contact). I'm thinking to connect the switch between an interrupt pin of my micro and ground, listening for CHANGE status. In this way I have ...
0
votes
1answer
49 views

What are the minimum and maximum number of cycles consumed when executing an interrupt on an STM32F0 MCU?

Assuming I set an external GPIO interrupt to highest priority, how many cycles does an STM32F0 MCU take to: start executing the interrupt handler code return from the interrupt I expect that the ...
0
votes
0answers
18 views

Can standard 8051 timer 1 and timer 0 be available to programmer when serial mode 1 is used?

The micro is an AT89C4051. It allows two timers and a serial port interrupt. Currently, I set things up so that if any kind of data is received on the serial port, it just is loaded into memory by ...
2
votes
1answer
66 views

NVIC Pending register vs EXTI Pending register (STM32F4)

Why there are two pending registers for interrupt? One of them is EXTI_PR and other one is Interrupt Set-pending Registers(ISPR) which is in NVIC controller registers. EXTI unit pending register: ...
0
votes
0answers
42 views

Waking up an ESP8266 using an MPU6050 accelerometer not working

I am trying to wake up an ESP8266 from deep sleep using an MPU6050 interrupt. I am using Micropython to configure MPU6050 to generate a 50us pulse (active low) on motion and connect it to the RST pin ...
3
votes
2answers
116 views

Set up an ADC ISR, but every time an ADC Interrupt is called it goes to isr_trap.asm instead

I am trying to do a program with my MSP430FR6989 from Texas Instruments. I send an Analogue signal to my ADC module in the uC, which converts it to a digital signal, if the value is greater than 0x800 ...
0
votes
1answer
44 views

LIS2DH12 Watermark and Overflow Interrupts at the same time

I'm working on a project that uses the LIS2DH12 accelerometer by ST (product page). I have a couple of questions about it, and as it is quite a common part, I wonder if anyone here knows the answers: ...
0
votes
1answer
35 views

STM32F030(K6) Systick not triggering (BOOT0 problem)

I'm trying to write a simple program for a STM32F030K6T6 microcontroller. The problem I am facing is the more common "Systick is not working" problem. The code is generated using Cube32MX (Firmware 1....
0
votes
0answers
23 views

Using UDRIE0 interrupt in ATmega168

I only have some limited knowledge in interrupts. This is what I understand about following ISR functions ISR(USART_RX_vect) will get called when a new data ...
0
votes
0answers
32 views

STM32f103 multiple TIMER IRQ to generate different timebase using SPL

I am trying to control two LEDs with different delays.I used CUBEMX for code generation and used TIM2 and TIM3 to generate different timebase. It worked without any issue. Simply using TIM2_IRQHandler(...
0
votes
0answers
64 views

STM8 - Unable to use timer2 with interrupt

I am trying to run timer interrupt in STM8 microcontroller. But I am not able to do so. I tried to read the counter Register and ARRP, but after loading the value as well both registers had the ...
0
votes
0answers
55 views

PORTB Interrupt-On-Change in PIC16F887 microcontroller triggering issue

I have a question regarding PIC16F887 internal interrupts. Can PORTB Interrupt-On-Change in PIC16F887 microcontroller be triggered if the PORTB is configured as output port? its Datasheet doesn't ...
1
vote
2answers
184 views

Timer0 overflow interrupt does not work on ATtiny10

I am trying to use the Timer0 overflow interrupt to make a little project. I used such a timer in the ATtiny45 and it worked, but with ATtiny10 no result. So I tried an easy LED blinking program and ...
0
votes
1answer
60 views

ARM cortex-A7 - cycle interrupts

I'm using a Banana Pi M3 with an ARM cortex-A7. I want to perform a task in a cycle with a fixed period with no delays and I was wandering if I could use an interrupt for that. Does this processor ...
7
votes
7answers
2k views

Is it possible to interrupt the copy process of a struct by an interrupt in embedded C?

Inside the driver I have got a function to copy the data from the internal struct into a struct from the application. Can this process be interrupted by a microcontroller interrupt trigger? ...
2
votes
2answers
164 views

Nested Vectored Interrupt Controller (NVIC) - Why is it “nested” and “vectored”?

In ARM microcontrollers there is an peripheral called NVIC (Nested Vectored Interrupt Controller). What does the "nested" and "vectored" part refer to, or why is it "nested" and "vectored"?
0
votes
0answers
70 views

What is the best strategy to capture multiple Wiegand inputs using AVR microcontroller

Wiegand is an electrical protocol using two data lines; one to transmit zeroes and one to transmit binary ones. There is no start or stop sequence. Data is sent over both lines as series of pulses. ...
0
votes
1answer
106 views

Understanding atomic writes to GPIO on different ARM Cortex-M's

This video succinctly describes why the read/modify/store has potential problems when it comes to interrupts. Very clear and understandable. He uses the TI Stelarris Cortex-M4 as a teaching board ...
2
votes
1answer
68 views

Interrupter on induction heater

Im currently trying to control the power of my induction heater, i want to use an interrupter to control it. but if i now interrupt the driver at random points, the mosfets wont turn off at zero ...
1
vote
1answer
90 views

5V Tolerant Way To Generate Rising Edge Signal on USB Connection

I have a microcontroller device that can be awakened from deep sleep mode when it detects a rising edge signal on a wakeup pin. The wakeup pin is 5V tolerant and I'd like a connection to a USB port to ...
0
votes
0answers
63 views

reading a bit from VCNL4010 sensor through I²C

I'm using the MSP430FR2433 LaunchPad. I'm trying to interface with a VCNL4010 sensor to my MSP device via I²C. After entering into Transmit(); I'm ...
0
votes
1answer
94 views

LSM9DS1 accelerometer with too many aux pins. Which ones are actually useful?

I'm designign a board with an LSM9DS1. I have an SPI bus (with only this device connected), two gpio for the chip selects (it has two CS, one for gyro and accel and the other for the magnetometer. ...
0
votes
0answers
147 views

Decoding mp3 with Helix lib on Stm32f411

I'm sending mp3 self-contained frames from PC to my STM32f411(Discovery board) via FTDI, on microcontroller I decode frame and send decoded pcm data to external DAC codec(on a board) via I2S. I'm ...
4
votes
2answers
168 views

Is it a good idea to refresh a display (8x8 LED matrix in this case) inside an interrupt handler?

Let's say I have an Arduino connected to a 8x8 LED matrix. In my case, the LED matrix is driven using two 74HC595 shift ...
8
votes
2answers
527 views

ATtiny13A - Can't generate software PWM with CTC mode

I'm trying to make a remote control RGB LED light using an ATtiny13A. I know the ATtiny85 is better suited for this purpose, and I know I might not eventually be able to fit the whole code, but for ...
0
votes
3answers
262 views

STM32F4 How are Preemption Priorities and Sub-Priorities used?

I have started working with ARM-based microcontrollers. I not understand subpriority and preeemptionpriority. For example: NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0x00; ...
0
votes
0answers
96 views

PIC18F452's timers and interrupts

The PIC18F452 datasheet explains that it has 4 timers: ...
0
votes
1answer
62 views

Output Compare Interrupt does not work avr atmega

Hey I'm trying to do blinking led using interrupts on 16 bit timer. My atmega model is Atmega168A. Chip clock rate is 12Mhz. Here is my code: ...
0
votes
1answer
69 views

Atmega168 interrupts not working

I am trying some simple programs to test my microcontroller, but I am having trouble with the first test program: blinking an LED using interrupts. I'm using an Atmega168A-PU. Here is my program: ...
-3
votes
2answers
195 views

Edge detection circuit (for rotary encoder)

I managed to decode a rotary encoder using an arduino to read the input signal but I noticed other than the interrupts, the code is mainly made up of lines similar to: "IF this AND that OR that AND ...
0
votes
1answer
35 views

Single Button Power Switch and Mode Selector

I am currently creating an embedded project and would like to know what you all think is the best way to proceed. My setup at its most basic is an ATMEGA328P, a simple momentary pushbutton, a ...
3
votes
2answers
133 views

Is D flip flop equivalent to frequency mixer (difference frequency) for square waves?

I was trying to make a frequency mixer (only difference frequency) for two square waves (PWM1, PWM2, both 0.5-4KHz range) using ONLY Arduino due. I'm new to signal processing, and the only way I can ...
1
vote
4answers
140 views

how long should an I2C slave wait for a STOP bit (if at all)?

I2C frames each group of message bytes in START and STOP conditions, defined as SDA changing state 1>0 or 0>1 (respectively) while SCL is high, as described here. I am writing interrupt driven ...
1
vote
1answer
94 views

Is it the right use of the RTC RV8523 to wake up an atmega328p?

I'm using the RV8523 to wake up every 2 minutes an arduino atmega328p. The rtc is wired like this : Where INT1 is wired to Port D pin 3. The internal pull up resistor is activated and yet it's ...
7
votes
2answers
878 views

Mutex in interrupts

For a small micro controller without an OS what is the proper way to share data between different interrupts and the main loop? With an OS one can just create a mutex for each critical part and carry ...
1
vote
1answer
1k views

How to receive bytes from SPI with interrupts using HAL on STM32?

Background I am trying to make a SPI connection between two STM32F103C8T6's. Measurements According to my logic analyzer I get a signal that looks ok (sending 10 bytes with values 0x55): Results ...
0
votes
0answers
31 views

Data storage interrupt when shorting the CAN bus

In the MPC5674 microcontroller, when creating a short circuit in the CAN bus, the controller is getting restarted repeatedly. The root cause of this reset has been found to be due to a 'data storage ...
0
votes
1answer
112 views

Atmega4809 Asynchronous USART doesn't trigger data register empty interrupt - iom4809.h error

TLDR ATmega4809, mis-labelled ISR in iom4809.h. How can I define an ISR without using these mis-labelled predefined values from iom4809? Using the ATmega4809 Xplained Pro eval board, I'm setting up ...
1
vote
1answer
69 views

Interrupt circuit

I'm using an 'Arduino like' board with a PIR sensor that gives 3.3V when movement is detected. The board usually stays in sleep mode, and wakes up when a LOW value is given to a specific pin. What'...
2
votes
0answers
42 views

nucleo-64 103rb EXTI stays pending

The PC13 EXTI interrupt (EXTI15_10) configured here keeps firing none stop. Most other questions about this same topic indicate that the respective EXTI_PR pending bit needs to be cleared in the ISR. ...
1
vote
0answers
65 views

MSP430G2553 Reading from ADC10 Temperature with Button ISR

This is my lab assignment. When I press the button, the red LED toggles on and off. But, I can't seem to read anything from it. Also, there's an empty loop in the code, but I don't know what to insert ...
1
vote
1answer
480 views

Remapping vector table in STM32F0 (no vector offset register)

I have written a bootloader before for a STM32 that had support for the vector offset and is easy peasy. For STM32F0xx using HAL I read I need to move the vector table to ram and copy from flash. I ...
0
votes
3answers
155 views

method to handle concurrent GPIO interrupt sources?

I have two GPIO interrupt sources running in two separate threads: GPIO pulses following line frequency(60 Hz) button press How can I use both these interrupts concurrently, considering my ...
0
votes
2answers
217 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
160 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 ...
0
votes
0answers
103 views

synchronised tasks and interrupts conflicts with filesystem

my program include timers (timer0 to call an ISR periodically, timer3 to measure execution time), spi to read (without DMA) and fatfs. I call a function each 250 µs periodically using timer0, this ...