Skip to main content

Questions tagged [interrupts]

Interrupts signal the processor events that need immediate attention. They could emitted by hardware or software. The response to interrupts takes place in an interrupt handler (interrupt service routine, ISR) that is called after suspension of the current running code and saving the processor's state.

Filter by
Sorted by
Tagged with
0 votes
1 answer
156 views

Attaching an interrupt on SPI MISO pin

I am reading an ADC that signals when the data conversion is complete by setting the SPI MISO pin low. I would like to set an interrupt on that pin, but using the GPIO library to do so isn't working. ...
2 votes
1 answer
70 views

magnetic field generated by the engine alternator affects gpio value

I am working on a dashboard for a motorcycle. I created a Qt application on my raspberry pi 4 on a raspberry pi os lite. I have configured one of my GPIO as interrupt using the wiringPi library. ...
0 votes
2 answers
329 views

are spurious interrupts common?

I'm trying to control nexa units with RF-modules connected to a raspberry pi and have written a little program in C to sniff the transmitted message from the nexa remote control. The software uses an ...
0 votes
0 answers
43 views

How to find IRQ numbers on Pi5?

I want to write a custom PWM kernel module, I want to write a handler which is called when the PWM interrupt is triggered. What IRQ number do I use when attaching the handler?
0 votes
0 answers
23 views

Initiating camera capture from kernel module

I'm using global shutter cameras, is there a way to initiate a camera capture from within a kernel module? In particular from within an interrupt handler triggered by a GPIO?
4 votes
3 answers
7k views

How do I implement an interrupt service routine on Raspberry Pi?

There are several libraries like WiringPi, RPi and pigpio, claiming to implement interrupt handling for GPIO signals. But as far as I can estimate, they all do polling on the pins, therefore implement ...
1 vote
1 answer
376 views

Is it possible to use both interrupts and ADC on the same pin of the RPi Pico?

In order to use the Raspberry Pi Pico ADC on a pin, the adc_gpio_init function is used, which disables all digital functions (https://www.raspberrypi.com/documentation/pico-sdk/hardware.html#...
1 vote
1 answer
121 views

why frequency output is not constant?

[![I uploaded piscope image and same time output image also for better understanding of issues][1]][1]I am using sample code of Pypi from "http://abyz.co.uk/rpi/pigpio/python.html" to detect ...
0 votes
1 answer
899 views

How to receive data longer than 32bytes through PICO UART?

I have wrote a code to process data received in a PICO from Raspi PI. I have a slider which sends number to the PICO(through UART) to set some values. If the slider is dragged slowly or clicked the ...
0 votes
1 answer
456 views

Timer for speedometer

A few years ago I wrote a c program for the ATMega168 to measure elapsed time between two triggers. Ostensibly to measure slot car speed and pellet speed from an air rifle. The processor ran at 20MHz ...
1 vote
0 answers
58 views

No FIQ.h on Raspberry PI3B+

I was exploring the FQI routine for ARM processors. I noticed that most Linux kernels provide a fiq.h header file yet my RPi does not seem to have it. Using find does not return anything. My Linux ...
0 votes
0 answers
144 views

SPI Interrupt Bit-Offset / Too Early

I´m running an SPI Slave on my Pico and executing an interrupt when 16 bits of Data are received. I visualized the interrupt with a gpio spike on the beginning and end of the interrupt to see when it´...
0 votes
0 answers
144 views

Interrupt Exception in thread Thread-1: and I2C read failed using pigpio

im writing a sensor program with python 3 that has a GUI and if the accelerometer detects motions it goes into an interrupt routine and saves and plots the data for a specific timeframe. Now onto the ...
0 votes
1 answer
668 views

Software SPI Interrupt

I´m trying to set up an interrupt function, that gets triggerd, when the 8bit RX register of my SPI port is filled on my Raspberry Pi Pico. The Raspberry is running in Slave Mode. I have checked the ...
0 votes
2 answers
223 views

Raspberry pi stuck at smbd.service?

I edited my /home/pi/.bashrc file, and i reboot it, but the raspberry pi stuck at smbd.service with the welcome screen.
0 votes
0 answers
165 views

Using Interrupts with Sense Hat

Im trying to use the Interrupts on the Sense hat (preferably in combination with the IMU), but i get this error GPIO.add_event_detect(INTERRUPT1, GPIO.FALLING,callback=my_callback1,bouncetime=300) ...
-1 votes
1 answer
271 views

Why i2cdetect slave can not detect polling way but interrupt can?

I had tried to use rpi as master to detect slave. The slave is MCU, using polling to answer rpi's request. However, when I tried to use rip to check the slave address, using command : i2cdetect -y 1 ...
1 vote
1 answer
815 views

rPi Pico IRQ with callback freezes Pico

I am trying to configure rp2040 function gpio_set_irq_enabled_with_callback on Pico using Arduino IDE with installed Arduino mbed OS because i need some libraries. When called interrupt happens but ...
0 votes
1 answer
2k views

Direct Access RPI-4 GPIO Interrupt

I am working on the RPI-CM4 board with raspbian buster OS. I am building an application to get interrupt events from the GPIO pin, fluctuating its state @20usec. I have tried the following things... ...
0 votes
1 answer
57 views

Process in real time

I am building a Pov Display using Raspberry pi 4 and a code written in Go. The raspberry pi has a sensor (btn) to know when it displays the code. The problem is my raspberry won't execute the code at ...
-1 votes
1 answer
715 views

Setting gpio input interrupt with direct memory access?

I am new learner for raspberry pi 3B+, I ever study stm32 mcu, but it's my first time to use an Linux OS on a developing board. I read the BCM2837-ARM-Peripherals manaul and learn how to turn on and ...
1 vote
2 answers
612 views

GPIO configured as interrupts detects noise of the engine even if isolated

Did anyone work with a Raspberry Pi in a an automotive project ? I am working on creating a dashboard for a motorcycle and it is making me crazy! when configuring a GPIO pin as an interrupt it ...
0 votes
0 answers
109 views

RaspberryPi 2 can not be restarted (sdhost-bcm2835 timeouts, print_req_error)

I have a relatively simple setup: One Raspberry Pi 2 is directly connected to my home router, running Debian 10 and PiHole with an Unbound rDNS service. That's it. I have set this system up two times ...
6 votes
3 answers
27k views

Debouncing buttons with RPi.GPIO -- too many events detected?

I'm using RPi.GPIO to handle events from a simple pushbutton. Pushing the button connects the associated GPIO pin (4) to ground. I would like to trigger an event when the button is released (e.g., ...
-1 votes
2 answers
335 views

C Interrput every rsing edge 100kHz

i've a 100kHz signal and i want to detect every rising edge. I'm using ISR but edge isn't detected and when detected it's 46µs after the edeg. How to do? [EDIT] Here's the code with pigpio library: ...
0 votes
1 answer
187 views

input interrupt error (UV projector)

I am trying to control a UV light projector with a raspberry. The raspberry recognizes the projector, as in the dmesg it says the product, the manufacturer and the serial number... but then this ...
3 votes
1 answer
3k views

Explanation of /proc/interrupts output

I couldn't find any answer about this by googling. Here my output of /proc/interrupts: pi@raspberrypi:~ $ cat /proc/interrupts CPU0 17: 3380 ARMCTRL-level 1 Edge ...
-1 votes
1 answer
3k views

function to wait for any of the buttons press

I'm working on a project that use four buttons to navigate in a menu. The root options of the menu have nested options etc. The buttons don't have hardware de-bouncing. My ultimate objective is to ...
0 votes
1 answer
1k views

How to implement serial event detection for request /response operation with Tkinter

I am working an application where I read two sensor values in every 200ms and show values in Tkinter window . My issue is in my application I have to response request from master PC through serial ...
2 votes
1 answer
1k views

How to use GPIO interrupts without going to multi-threading [closed]

Using a Pi 3+ in an animated display. The servos in the display are run from a 16 channel "bonnet" on the Pi. I am using RPI.GPIO to deal with GPIO issues. What I want is for one set of ...
2 votes
1 answer
754 views

Using event detection to immediately interrupt a function and callback to

I have made a script (below) which which controls a LED through two functions, blink_fast() and blink_slow(). My goal is to control the "mode" of the LED by using a physical push-button wired to GPIO. ...
0 votes
3 answers
2k views

GPIO.add_event_detect requires root

I am trying to run a program using GPIO from a normal user. I checked that /dev/gpiomem has the correct permission (root:gpio 0660) and that my user is member of group gpio. The following works ...
2 votes
1 answer
175 views

Cannot detect interrupt properly on a pulled up line

This is my simple setup simulate this circuit – Schematic created using CircuitLab This is my test program, using nodejs and rpi-gpio. var gpio = require('rpi-gpio'); gpio.on('change', ...
1 vote
1 answer
418 views

How to set up an interrupt for a PWM pin

I have a GPIO pin set up as a PWM. I would like to set up an interrupt every time the PWM signal goes high. Is there any way of doing it? I tried mixing the pigpiod library and rpi library, but when ...
6 votes
0 answers
475 views

FIQ interrupt configuration

I have tried to write a driver (in the kernel) that interrupts every time the data received from the ADC is ready to be read (Analog to digital conversion is done). The problem is that sometimes the ...
0 votes
1 answer
126 views

why raspberry pi 3 fail to read 1000 p/r rotary encoder while my 8 bit nuvoton micro controller did that properly?

I am using LS s40-6-1000ZT(H) 1000 p/r rotary encoder for my project with raspberry pi 3,but raspberry not working properly as per encoder specification(i.e not counting event properly).What could be ...
0 votes
2 answers
4k views

Fastest Hardware Interrupt software?

I'm wiring my Raspberry pi to a USdigital encoder , especifically this model "H6BM-1000-500-IE-S-H" , it has 1000 signals per revolution , I've followed the tutorial on http://raspi.tv/2013/how-to-...
1 vote
1 answer
656 views

Unosquare.RaspberryIO: unregister from InterruptCallback

I'm developing an application on C# using Unosquare.RaspberryIO. My question related to interrupts and callbacks. According to the documentation, it's possible to register callbacks. For example: pin....
0 votes
2 answers
1k views

Communicate with GPIO HIGH/LOW between 2 PIs

I have 2 raspberry PIs 1x PI3 and 1x PIZero with camera attached. I want to set up a system to have a output GPIO pin on the PI3 and a input pin on the pizero connect so that when I set the PI3 pin ...
0 votes
1 answer
489 views

RPi.GPIO "flush" interrupts

Intro It seems to me that when one adds and event detection, then removes it and the adds it again, something strange happen: 1) an event is removed to the "detection list"; 2) the event happens; 3) ...
5 votes
1 answer
4k views

Reading HC-SR04 echo with wiringPiISR()

The following code works with the busy wait, but if I replace the while loop with a call to wiringPiISR() it always returns 0 for the distance. I also tried calling wiringPiISR() before raising the ...
1 vote
0 answers
154 views

Interrupt triggers without button pressed what can i do?

I have two buttons: a red and a green one and i want to measure how often each one gets pressed and i want to write into a csv file. The problem is even without me pressing the buttons the pi gets ...
1 vote
0 answers
297 views

Interrupt issue - Wiringpi and pigpio show different values for pin

I am having an issue with raspberryio/wiringpi interrupts. A lot of extra interrupts are generated. My configuration is as follows: Physical pin 16: Set as input Pulldown resistor Interrupt ...
1 vote
0 answers
256 views

Pin interrupt intermittently not triggered with MRAA/WiringPi library

I am working on a project to fetch sensor data from an Arduino with a RPi3B+ board. I use SPI bus to perform the data transmission. Every time when the data in Arduino is ready, Arduino will pull down ...
1 vote
0 answers
1k views

Interrupts with MCP23017 using the mcp23017 dtoverlay

I'm at my wits end with this one. Okay, so we've got an MCP23017 with its INTA wired to the Pi gpio12 (bcm) in /boot/config.txt dtoverlay=mcp23017,addr=0x20,gpiopin=12 so far so good. I'm looking ...
0 votes
0 answers
284 views

LCD Display with I2C gives garbage when called by interrupt

I have problems with a 2x16 LCD Display controlled via I2C. I use python 2.7 and have a Raspberry Pi Zero W. When called from the main loop everything works fine and I can access the display with ...
1 vote
0 answers
1k views

Access Timer Interrupts in Raspian

I want to write a C program that runs some code at a fixed interval (somewhere between 200us and 1ms, TBD). Is it possible to use the hardware timer interrupts to execute code without resorting to ...
1 vote
1 answer
1k views

Write interrupt data into a Raspberry pi Register on C?

I'm trying to read interrupts and detect direction of interrupts from an encoder using a raspberry pi , it is USdigital Brand "H6BM-1000-500-IE-S-H" , it has 1000 signals per revolution , the thing ...
0 votes
0 answers
2k views

Python script wait for button press before starting/stopping a separate python script

I've written a python script (shown below) which starts and stops another separate python script (datalogger) once a button is pressed. The datalogger script records logic levels (0 or 1) and stores ...
3 votes
1 answer
1k views

Use of gpio interrupt 2 rather than interrupt 3

I have studied in bcm2835 manual that its gpio peripheral can generate three interrupt lines. But in the same manual (interrupts section) I found that there are four gpio interrupts, gpio_int[0] to ...