All Questions
Tagged with isr or interrupts
870 questions
1
vote
4
answers
137
views
Atmega328p stops mid instruction when in interrupt
I want to make a basic temperature/humidity/CO2 controller with a SDC41 sensor and i want to use an INT0 interrupt to switch from normal controller mode to menu mode to change set values. When i press ...
0
votes
0
answers
57
views
Using two UARTs to receive causes one UART to save data from another
I am working with the STM32-H7 microcontroller and am attempting to receive bytes from another microcontroller and then printing to Putty using the USB UART. I am using USART 2 and 6 with interrupts ...
0
votes
1
answer
74
views
Is parallel buffering with ISR possible?
Speaking generally, given a time-critical module and an MCU (act as buffer),.
If we look at the datasheet of the module, we know the timing diagram. Then, it's possible we can read the module through ...
6
votes
9
answers
1k
views
Is it a good idea to perform I2C Communication in the ISR?
I am working with an I2C based sensor. The requirement is that whenever some new data is ready, it generates an interrupt (hey, new data is ready, aka RDY.) What I have implemented currently is, I ...
1
vote
2
answers
184
views
Measuring the frequency of a square wave using rising edge interrupt
I am using a Texas Instruments C2000 board. On a GPIO I have attached a rising edge interrupt. A square wave of approximately 50 Hz is fed into this GPIO. This wave is from a comparator which ...
1
vote
5
answers
150
views
Hardware interrupt for PC from GPIO signal
I'm looking for a fast method to synchronize between a GPIO signal (3.3V TTL) and a Python program.
Currently, I'm using an Arduino with the following setup:
The Arduino (Arduino Uno) works in 2MHz ...
1
vote
1
answer
68
views
6522 Clearing Interrupt flag of shift register without restarting it
The 6522 Via Adapter (R6522 in my case) has an internal shift register used for communication.
When shift a byte out in mode 5 (Shift out under T2 Control) an interrupt will occur after 8 pulsing and ...
2
votes
1
answer
90
views
In AVR-GCC, I am trying to get an atmega328p to sleep and then wake on USART RX, but it locks up
My hardware is pretty straight forward. I have an ATMEGA328P hooked up with an LED on PB5, primarily to troubleshoot, and a wire that connects PD2 (INT0) to PD0 (RX), hoping to use INT0 to wake up the ...
0
votes
1
answer
64
views
STM32L432KC Timer interrupt only triggers once
I am trying to send a message through UART based on Timer 6 interrupt on STM32L432KC microprocessor. The prescaler is set to 39999 and the auto reload is set to 19999 to get an interrupt every 10 ...
0
votes
0
answers
58
views
Set interrupt pending in STM32H563ZI
I want to trigger SysTick (or any other) interrupt by setting the interrupt pending bit in some NVIC register to 1 (read it on the internet) but I can't find the ...
1
vote
1
answer
178
views
For a UART communication, when do we enable/disable the peripheral wrt changing between transmitting and receiving mode?
I am working with SAML22 microcontroller and I am supposed to write the transmission code using the interrupt mode. I am confused in which case I am supposed to disable the peripheral.
When changing ...
0
votes
0
answers
39
views
N DMA Transfers based on a timer trigger using stm32F429I
I'm trying to use timer 8, stm32f429I, as advanced timer, to do N DMA transfers, that copies data from port D to memory and it does trigger on PC6 after triggering, an N DMA transfers should be shot I ...
-1
votes
1
answer
73
views
What is minimal frequency to detect such signal? [closed]
I develop simple signal generator, to debug other devices. It sends high logic signal which has length approximately time length 64 microseconds. If i connect some device which has processor frequency,...
0
votes
0
answers
97
views
Two basic timers on an STM32 don't work simultaneously
I have an STM32L073RZ and it has TIM6,7 basic timers. I need a timer interrupt. TIM7 works fine as I want, but TIM6 doesn't. I tried different settings of prescaler and counter: same as TIM7, almost ...
0
votes
1
answer
61
views
Difficulty defining interrupt in PIC18F14K50 [closed]
When I try to set the interrupt on change in PIC18F14K50, I can't get the interrupt to run once and turn off the flag. What could be the problem in working with this component?
I am working with the ...
2
votes
0
answers
44
views
Mechanical USB interrupt [closed]
I'm quite the noob to USB controllers. I want to create a mechanical interrupt for USB power for a connected device.
Long story. Car has a USB a connection (probably3.0) for the stereo/phone ...
0
votes
2
answers
97
views
SPI slave is sending one byte twice at a very specific time in data packet and causes corruption of the whole data packet
I am trying to communicate with a display device (master) which sends two type of data packets with 50 kHz clock. One data packet is 16 bytes and one is 32 bytes long. The data format is as follows:
...
1
vote
0
answers
69
views
Arduino Nano 33 IoT: PWM read jitter
I am trying to read two 2 kHz (500 μs period) PWM waves (from two Hall-effect sensors) at two digital pins of an Arduino Nano 33 IoT simultaneously with on-duty ranging from roughly 30 to 70%.
One ...
0
votes
4
answers
626
views
Where should the interrupt vector table be placed in memory on STM32H7A3RGT6 chips?
According to the STM32H7 programming manual "On system reset, the vector table is at address 0x00000000."
But at the same time the STM32H7A3 reference manual says in it's memory map ...
-1
votes
1
answer
144
views
SX1276 Interrupt Flags never clear, and digital IO lines never rise/fall
I am using an SX1276 chip from Paradisetronic. I adapted the Arduino RadioLib library to my board (Beaglebone Black Rev C). I noticed that the IRQ flags will not be cleared. According to the manual (...
1
vote
1
answer
384
views
Can I use a different channel of a timer at the same time?
I am using AVR128A for a project. It comes with two 16-bit timers (Timer 1 and Timer 3) and two 8-bit timers (Timer 0 and 2).
Timer 1 has two channels whereas Timer 3 has three.
I have all the timers ...
1
vote
1
answer
153
views
I2C to USB converter with interrupt
I have a touch screen with I2C and interrupt output and I would like to connect this touch screen over a USB cable to a host controller.
I know that it is possible to transfer interrupts on the USB ...
1
vote
0
answers
96
views
Fall edge interrupt constantly triggering without any visible edge
I'm trying to implement a button-operated sleep mode toggle on a Sparkfun Artemis module. Button press one puts the Artemis to sleep, button press two wakes it up. I'm coding it in the Arduino IDE and ...
1
vote
2
answers
438
views
PIC based MCU coding to make a speedometer
I am trying to make a speedometer cum odometer. I'm using a PIC based MCU. The speed I'm getting is as an analog input. (at 0 V, I get 0 km/h and at 18 V, I get 25 km/h). I can easily measure the ...
0
votes
1
answer
32
views
Pic32MZ interrupt signal to output pin set without CPU usage
I generate ADC digital comparator interrupts. I want to use this interrupt to trigger Input Capture module. To achive precise timing it will be better to directly trigger IC module with ADC digital ...
0
votes
0
answers
126
views
Is it possible on STM32 to detect if an event triggered?
According to Stm32 Event and interrupts , STM32 events are mainly for controlling other peripherals.
Is there a way on the MCU itself to detect if an event fired? That is, I don't need to interrupt ...
0
votes
5
answers
494
views
Interrupts: does execution continue afterwards, and how long can they be?
I’ve been reading that interrupt callbacks must be very short. I have two questions:
Imagine the while(1) loop inside the main. I guess this while(1) loops with clock frequency(?). Does this looping ...
0
votes
0
answers
54
views
Experiencing Much Higher Data Rate than Timer Interrupt Settings While Reading IMU Data via I2C on Arduino
I am currently using an Arduino MKR ZERO to gather IMU data from three MKR IMU SHIELD boards(BNO055 IMU). I have utilized the <Adafruit_ZeroTimer.h> library to set a timer interrupt with a ...
1
vote
2
answers
82
views
Not having a PORTAbits.RAx on ISR breaks my code
I'm working on a 433MHz RF reciver code for a PIC16F628A using a cheap 433MHz receiver. The catch here is that I'm only able to use RA4 for the RX, and because of that i had to use timer2 (because the ...
0
votes
1
answer
117
views
What is Interrupts in ESP32? [closed]
I am working with ESP32 WROOM32 Controller and AHT25 Temperature and Humidity sensor. I need to work with Interrupts in my device. Basically I don't know what is interrupts and How to use my device ...
0
votes
1
answer
67
views
Tsi107 PowerPC Host Bridge Vs Processor
I a confused regarding the difference between a powerPc host bridge and a processor. According to the host bridge datasheet, it can be programmed, and it has interrupt generation and handling, and ...
0
votes
4
answers
211
views
Why is timer interrupt on PIC MCU not behaving as desired?
I am using PIC16F627A with PICKit 3. MPLAB X IDE v5.40 (and associated IPE) with XC8 compiler v2.41.
PIC16F627A datasheet
My intention is to flash TOWER_LED in ...
2
votes
0
answers
80
views
ATmega - nested interrupt
I need to wait on PIN_CHANGE interrupt during pending TIMER interrupt.
Is that right to do it like in code below?
Is the interrupt still enabled during ...
0
votes
2
answers
153
views
Why doesn't polling require a context switch?
When we have a microproccessor and we must service the peripherals, the theory suggests that we can use either interrupts (context switch required) or polling (no context switch required.) On the ...
1
vote
2
answers
679
views
STM32F746 Disco: Why doesn't the RTC generate an alarm A interrupt?
I'm trying to generate an interrupt every 60 seconds using alarm A. I put a HAL_GPIO_Toggle instruction inside the interrupt HAL_RTC_AlarmAEventCallback to turn an LED on to see if it triggers but I ...
0
votes
1
answer
297
views
How can I change SPI ports on an Arduino?
My end goal is to read information from an nRF24l01 module connected to my Arduino UNO R3 and generate an interrupt while doing that.
I have read that for hardware interrupts, only pins D2 and D3 can ...
0
votes
1
answer
139
views
On an embedded system, when you have a hardware interrupt, what happens to the process status word?
I have been taught that when an interrupt arrives, the following generally happens:
The current instruction finishes.
The interrupt is acknowledged.
The hardware state(PSW) is stored .
The PC is ...
1
vote
1
answer
80
views
MSP430G2553: ISR not triggering when I2CTX-Flag is set
So I need to get an I2C up and running. To do so the µC relies on ISR's to push data byte by byte onto the data-line. So far so good I programmed my functions and ISR's to transmit and receive data. I ...
0
votes
1
answer
162
views
IIM-42352 interrupt triggers multiple times, when condition is only met once
Currently I am working with esp32-s3-mini system which communicates with IIM-42352 accelerometer via SPI.
My configurations are as follows:
*FIFO mode- stream to FIFO
*Packet size- 16 bytes
*Interrupt ...
1
vote
3
answers
186
views
ATmega - How to decrease the time of jumping into PCINT ISR
I need to jump into PCINT ISR as fast as possible after signal appears on pin.
Currently it takes about 20 clock cycles. I would like to decrease it to 10 cycles.
I am using C.
Is there a way?
I found ...
0
votes
0
answers
101
views
Issues reading data back from 24LC512 EEPROM via interrupt on MSP430F47187
I have interfaced MSP430F47187 with 24LC512 EEPROM. I am able to write to the EEPROM without any issue but reading the data from the EEPROM is problematic as the reading stops after a while.
I have ...
1
vote
1
answer
75
views
Cannot stop Microcontroller's Hardware Timer from running
I'm using an Atmel ATMega8 microcontroller to control a stepper motor. (Datasheet).
Timer1 (a 16-bit hardware counter) is used in CTC mode to modulate an IO pin to provide the stepping signal to the ...
0
votes
1
answer
538
views
Using Timer Interrupts Instead Of Delays in PIC Microcontroller
I have this task where I have to use timer interrupts intead of delays (for efficiency purposes) in this 7 segment display circuit with PIC18F4620.
Here is the circuit:
Display is common anode.
I ...
0
votes
1
answer
141
views
STM32 PWM timer interrupt latency
I have STM32F401 board (WeAct Black Pill V3.0, but the chip is labeled as STM32F401CCU6).
My task is to read output of AD7606 (16 bit, simultaneous sampling, 8 channels, 200 kSPS max) in parallel mode ...
0
votes
1
answer
54
views
How to make a circuit which can give divided voltage to ADC and can send a trigger pulse to INT0 when I press a button?
I connected 4 buttons to the ADC module of AVR-ATMega328p with different resistor values,
To know which button is pressed this ...
2
votes
0
answers
90
views
Nucleo32 with STM32F303K8 crashes when setting PA2 as Interrupt and triggering it
I am using a nucleo 32 for my project. I am using arduino and creating a TCP modbus and RTU modbus server.
I have set the pins as folows:
Description
Type
Arduino
STM32
Pin Number
Pulse input 1
...
0
votes
1
answer
72
views
Why are pulses not generated? [closed]
Task: Implement interrupt processing when the button is pressed, and the very start on the rising edge, the interrupt pin and to which the button is connected 11. Implement the processing of the ...
0
votes
1
answer
70
views
STM32F405: WWDG interrupt occurs right after WWDG enabling
I've faced the problem with WWDG on STM32F405 (the same problem described here, but with no no solution):
After enabling WWDG interrupt occurs immediately, despite the fact, that counter is far from ...
1
vote
2
answers
1k
views
How do I handle interrupts manualy by registers in STM32?
I've just started learning STM32, and I'm learning it at low (register) level without libraries.
It is very easy to use GPIO: I #define memory addresses (like ...
0
votes
0
answers
160
views
ADXL345 Interrupt doesn't work
I am using adxl345 with arduino. I am using sparkfun's library. I am using adxl345 with I2C. I can read adxl345 value without any problem and I can detect inactivity and activity.
...