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]

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

0
votes
0answers
39 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 ...
0
votes
0answers
17 views

How many usb-rs485 dongles can I use before there's too many for my device (raspberry pi) to handle?

I'm using 8 Usb to rs485 dongles, each dongle talking to about 4 serial devices. I'm planning on each irq completing quickly and passing the actual work off to a queue. Is this a bad design? would one ...
2
votes
2answers
39 views

SPI xfer2 callback possible?

I would like to control 10 different devices with SPI. As there is not enough ChipSelect outputs I use GPIO to toggle a MUX on the clock. Problem is I have to wait until the SPI is done transmitting ...
1
vote
1answer
62 views

GPIO interrupt detecting wrong values

I have a device which is based on Raspberry pi. It is known as ionoPi which is basically an i/o expansion board for Raspberry pi. I am writing a python script which detect signal change on input 16 ...
0
votes
0answers
90 views

wiringPi (C) , MCP23S17 , and interrupts

I've enjoyed using the wiringPi C library in various ways. Used it with vanilla GPIO, with its interrupt-handling feature, with MCP3008, MCP23017, and now the MCP23S17. However, I'm a bit stumped on ...
1
vote
0answers
80 views

Raspberry Pi3 should I use multi-threading, interrupts or callbacks?

Project Description I am interfacing industrial PLC's with the Raspberry Pi 3 in order to read the efficiency of the given line, and display live results. In essence I need to do the following things:...
0
votes
1answer
87 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
1answer
45 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
0answers
12 views

Raspberry Pi Zero not displaying anything on screen

I have installed Raspbian using NOOBS. It boots and the home page appears. Then, suddenly it turned off and rebooted. It turned off again and now nothing appears on screen. I have tried powering it ...
0
votes
2answers
263 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 ...
0
votes
2answers
433 views

GPIO.wait_for_edge and signal.signal()

I have the below sample code that is trying to implement a safe shutdown mechanism ( yet to fully implement) For some reason, I am not able to catch any signals using the registered signal handlers. ...
0
votes
1answer
139 views

GPIO switch interrupts work just once?

i have this strange problem with interrupts. I use GPIO switches to change a variable that defines what my code is doing. As soon as one of those interrupts worked once, none of them workes anymore. ...
2
votes
0answers
294 views

Why does the keyboard interrupt not work? [closed]

The code below runs on boot via this command in the /etc/rc.local file: python3 /home/pi/Desktop/booth.py. When a button is pressed, the PiCamera preview begins, which covers my whole monitor screen ...
3
votes
3answers
4k 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., ...
0
votes
0answers
70 views

Interruption is not working properly

I'm currently working with Python in the Raspberry Pi, I have setup an interruption in GPIO4. This one is inside of a class called 'Record'. When the button is pushed, this action toggles a variable ...
0
votes
1answer
447 views

Wiringpi interrupts

If I make an interrupt and use a goto statement to go from the interrupt function to the main function will I start running into problems: with the flow of my program and with bugs. Will I start ...
1
vote
2answers
196 views

Clear GPIO Event Detect Status

At page 96 of the Manual for the BCM2835, the synopsis for the "GPIO Event Detect Status Registers (GPEDSn)" states that "The bit is cleared by writing a “1” to the relevant bit." However, regarding ...
0
votes
1answer
60 views

How do I use a hardware interrupt to restart a main loop?

I am making a Raspberry Pi librarian which can keep track of available books and who has taken out a book. Users scan NFC cards to begin the process of borrowing a book. The main program is an ...
0
votes
1answer
426 views

Access Raspberry Pi3 Timer using Python

there is a way to get access and then configure Raspberry pi Timers using a Python? I saw some code to do that but it always be in C. Like here [BareMetal] Timer on Raspi All this I need to send ...
2
votes
1answer
615 views

RPi.GPIO interrupt

Is there any way to pass args to the callback function when using GPIO.add_event_detect(17, GPIO.FALLING, callback=my_callback, bouncetime=300)
0
votes
0answers
202 views

Playing audio mess with GPIO.add_event_detect in Python

I have these lines of code running in Python on my Pi 3: os.system('mpg123 -q /usr/local/marbik/public/evilcave.mp3 &') GPIO.add_event_detect(17, GPIO.FALLING, callback=GPIO17Callback, bouncetime=...
0
votes
1answer
193 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
2answers
3k views

How can I detect how long a button is pressed?

Running Python on a Raspberry Pi Zero. I have one button connected to GPIO26, set for input and pulled up. I setup my interrupt like this: GPIO.add_event_detect(26, GPIO.FALLING, callback=...
1
vote
0answers
49 views

Why is Linux switching off the ARM timer interrupt shortly after I enable it?

When I set the ARM timer control register's "timer enabled" bit, it clears the interrupt "enable basic IRQs" bit for the ARM timer after a brief delay. Why is this happening? I ran this test: #...
0
votes
1answer
284 views

Volume dial - ADC interrupts with SPI

I'm trying to implement a volume dial. I've got a potentiometer hooked into ADC 0832B (http://www.ti.com/lit/ds/symlink/adc0832-n.pdf), timing diagram below: When I turn the volume dial, I want an ...
3
votes
2answers
331 views

Inconsistency between GPIO block diagram and interrupt table in the BCM2835 datasheet

I'm looking at the BCM2835 datasheet https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2835/BCM2835-ARM-Peripherals.pdf. On page 89, there is a block diagram for the GPIO module, as ...
0
votes
2answers
245 views

Is there a way to have Multi-Condition Interrupt

In Python, Does anyone know if there is a way to have a multi-input interrupt? I have a 4 button input and I want to be able to have a special condition to reset. I know interrupts are written like: ...
0
votes
1answer
532 views

Why isn't gpio_set_debounce working in my Raspberry Pi Zero kernel module?

I'm stuck on example 1 from this tutorial. I found the Raspberry Pi code for it here. I uncommented the gpio_set_debounce line and compiled the module, but my switch still bounces a ton, resulting in ...
3
votes
1answer
443 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 ...
0
votes
1answer
213 views

Giving a process exclusive use of a CPU core on a Pi 3

On the quad-core CPU Pi 3, is there a way of giving one single-threaded process exclusive use of a single, named, core? Interrupts would also need to be routed away from the chosen core. The purpose ...
1
vote
1answer
592 views

SPI control of WS2801 LEDs, fails when using GPIO interrupts

I have three libraries (is library the right word?) that I'm using in my Python code: An Adafruit NeoPixels library, which comes from the rpi_281x library to control them via PWM, on GPIO pin 18. ...
0
votes
1answer
756 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
1answer
1k 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
0answers
461 views

Ultrasonic Sensor HC-SR04 Lag Problem (20Hz only) in PID control loop

Good day, I am currently working on an autonomous quadcopter project. I am using the HC-SR04 sensor for altitude hold, however in testing the sensor, the maximum data throughput of the sensor is only ...
1
vote
1answer
725 views

Using INT interrupt line on PCF8574 I2C 8-bit IO-expander on Bit-banged RPi GPIO?

I am planning to use a triplet of RPi GPIO pins as an additional bit-banged I2C bus on my RPi. This will be run at a lower than typical rate (and level-shifted via a 3.3 to 5.0 V I2C shifter unit) so ...
3
votes
1answer
3k views

Raspberry Pi 2 B GPIO pwm and interrupt pins

Good day! I would like to use pwm and interrupt on raspberry GPIO pins but i don't know which GPIO pins are actually dedicated for pwm output and which is for hardware interrupts, is there a way for ...
1
vote
0answers
371 views

Button Interrupt Problem

I'm working on a project for my Raspberry Pi. I have stumbled upon a problem with creating interrupts through a button on my breadboard. I have bought a PiCamera and I intend to make it so that ...
2
votes
1answer
466 views

Button Interrupt Doesn't Work

I'm working on a project for my Raspberry Pi. I have stumbled upon a problem with creating interrupts through a button on my breadboard. I have bought a PiCamera and I intend to make it so that ...
1
vote
1answer
860 views

Wiring Pi interrupt not working

I have a Pi hooked up to the output and reset nodes of an NOR gate S-R latch. For those of you who don't know what that is, basically I have an input in GPIO pin 11 that goes high (3.2V) whenever the ...
8
votes
1answer
1k views

How to write device tree overlay for analog device touchscreen ad7879 i2c

I wrote a device tree overlay for driver ad7879-i2c touchscreen (compiled as module using Raspberry Pi source, files: ad7879-i2c.c, ad7879.c). Driver gets loaded but i guess parameters are not passed ...
1
vote
2answers
327 views

Is it normal when a pin goes low it triggers a interrupt on an another one?

I have the following : Output Pin 17 (wiringPi pin number 0) to a relay module -> a LOW means the relay will let current pass. 5V pin to power the relay module Input Pin 22 (wiringPi pin number 3) ...
2
votes
2answers
1k views

using try-catch to catch gpio interrupts

Is it possible to interrupt a try-except code in python with gpio interrupt to generate exception? In the "try" part i'm openning a socket and use socket.serve_forever(). I want to make a hard-reboot ...
2
votes
1answer
4k views

WiringPi: using interrupts with Python

I want my RaspberryPi to perform some actions when the light in a room is switched on or off. To do so, I connected a photocell to the GPIO pins. Previously, I used some python 3 program that queried ...
0
votes
2answers
1k views

Safe shutdown button not working

I used the method described here and here , which is a python script based on interrupts, to enable safe shutdown via push-button press. These are the steps in short: 1- sudo nano test.py 2- and ...
1
vote
0answers
332 views

BCM2835 GPU interrupt handling with FREERTOS

I am using Raspberry Pi with Freertos. But I dont know how to handle GPU interrutps for UART, I2C, SPI of BCM2835 with Freertos. So, can anyone give answer about this?
1
vote
0answers
1k views

kernel Disabling IRQ #49

I am using the RPi_GPIO library in a python shell to read a raw wireless signal using the wait_for_edge() function in a loop like so: while True: GPIO.wait_for_edge(26, GPIO.RISING) print 'R' ...
1
vote
1answer
103 views

How to program an interrupt that is not dependent on GPIO? [closed]

You can program an interrupt so that the Pi can wait for something like a rising edge on one of its GPIO ports. But, can you program an interrupt for an event that is not GPIO dependent? For example:...
1
vote
1answer
3k views

How to use a gpio as an interrupt?

I am looking for how to use a gpio as an interrupt using device tree dts file. previously I did that by using the following code in my dts file interrupts = <3 30>; ...
1
vote
1answer
273 views

what is the differnece between the gpio interrupt and hardware interrupt?

In raspberry linux, we are using interrupts and gpio interrupts. Whats the difference between them?
0
votes
1answer
88 views

How many GND does a RasPi model B rev.2 P1 header have?

I see a lot of conflicting documentation on how many GND pins are available on model B rev. 2.0. I have hardware revision "000e" and there are a lot of DNC (Do Not Connect) pins. http://pi4j.com/pins/...