0

I've been working on a PHP library for Raspberry Pi for a few years now, and since (not sure specifically which) a version of Raspbian Stretch, the Pi becomes completely unresponsive when clearing the edge detect bits. This happens regardless of if I use dev/gpiomem or dev/mem. It seems strange to be able to crash the system entirely as an unprivileged user. It happens regardless of whether native PHP calls or a Python mmap proxy are used.

Have there been any changes to the kernel that could possibly cause this?

I've tried previous versions of the code (which were definitely working) in the current Raspbian release and they no longer work. All versions of the code still work in earlier versions of Raspbian

As an aside, I've noticed that no versions of the PWM code work anymore either, and can only assume that this is related. I've had a look through pigpio and WiringPi and can't see any measurable difference to how I'm interacting with the registers.

There's some more context on the Github issue

11
  • earlier versions of Raspbian - what is the latest earlier version you know works Commented Sep 17, 2018 at 0:20
  • Unfortunately I'm not sure specifically, but jessie/4.4.41 is definitely ok. I'll see if I can find a live stretch install to test (that's not current)
    – calcinai
    Commented Sep 17, 2018 at 2:27
  • Well, that's more information than you had - could well be a "breaking" change between jessie and stretch! Commented Sep 17, 2018 at 2:40
  • @JaromandaX yeah, I thought that could be the case but as I mentioned I couldn't see any significant changes in the other libraries between those versions..
    – calcinai
    Commented Sep 17, 2018 at 3:10
  • what if it's kernel or firmware? Just speculating Commented Sep 17, 2018 at 3:14

1 Answer 1

0

A year on, an answer!

Adding dtoverlay=gpio-no-irq to /boot/config.txt fixes it.

Previously the kernel would automatically disable interrupts when you set one of rising/falling edge detection methods but that apparently stopped happening, causing a kernel panic.

Seems to be the same thing that was happening here

1
  • Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Feb 12, 2020 at 19:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.