Git Product home page Git Product logo

Comments (5)

rspier avatar rspier commented on July 27, 2024 3

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.

yzj578492228 avatar yzj578492228 commented on July 27, 2024

from go-rpio.

jax-b avatar jax-b commented on July 27, 2024

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.

rspier avatar rspier commented on July 27, 2024

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.

peritonow avatar peritonow commented on July 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.