Comments (5)
Found
WARNING: this might make your Pi unresponsive, if this happens, you should either run the code as root, or add
dtoverlay=gpio-no-irq
to/boot/config.txt
and restart your pi,
in the docs.
It came from #35, of which this bug is likely a dupe.
from go-rpio.
from go-rpio.
I have updated to 4.6 and it is still a issue, I had one run where instead of crashing it locked the file system
from go-rpio.
I can replicate this on v4.6.0 on a Pi Zero W. It hangs if I run as my user (which is a member of group gpio
) but works fine running as root.
from go-rpio.
Thank you ... yes, adding 'dtoverlay=gpio-no-irq to /boot/config.txt' was the solution in my case due to linux kernel bug still present in version 5.10.103-v7+. Maybe it would be useful to add this as part of go-rpio documentation.
this was useful : https://www.i-programmer.info/programming/hardware/14114-raspberry-pi-iot-in-c-events-a-interrupts.html?start=1. BTW, Linux doesn't support user-mode interrupts so it works only if run as root user in older Linux kernels.
it seems that in case of the hardlock prevention one can issue a code to disable gpio-no-irq per program run. The code is in C, but it can be easily adopted to golang.
... c code
int txfound = 0;
while (fgets(output, sizeof (output), fp) != NULL) {
printf("%s\n\r", output);
fflush(stdout);
if (strstr(output, "gpio-no-irq") != NULL) {
txfound = 1;
}
}
pclose(fp);
if (txfound == 0) {
fp = popen("sudo dtoverlay gpio-no-irq","r");
if (fp == NULL) {
printf("Failed to run command\n\r");
exit(1);
}
pclose(fp);
}
...
from go-rpio.
Related Issues (20)
- strangely, does *not* work with sudo HOT 8
- SPI Locking? HOT 2
- Nice library but seems PWM is behaving a bit strangely HOT 3
- Dockerize? HOT 3
- [BUG] Issues using SPI and GPIO with HOT 1
- RPI 4 B PWM not working HOT 8
- cannot find package "github.com/stianeikeland/go-rpio/v4" HOT 1
- pullup does not work on RPI 4 B HOT 4
- Seems not work on Raspberry Board 4 and ubuntu server 20.04 HOT 1
- New release HOT 1
- Pico HOT 1
- Pi4 PWM frequency wrong HOT 2
- Add support for PWM "Balanced" algorithm (default BCM mode) HOT 8
- "Undefined: syscall"
- How to call async
- Interrupt/event based edge detection HOT 1
- seg fault on Read() HOT 2
- Misleading SPI to GPIO pin mapping in code documentation: CE0 should be mapped to GPIO 8 HOT 1
- Raspberry Pi 5 Support HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-rpio.