piras77
Posts: 147
Joined: Mon Jun 13, 2016 11:39 am

Kernel seems to reset the Event Detect Status Register

Sun Sep 10, 2017 11:32 am

Hi there,

It appears to me that the Raspbian kernel (4.4.50+ Feb 20 2017 on Pi Zero) resets occasionally the event detect status register.

The use case: I wait for a falling edge which (even it is there) occasionally isn't reflected in the event's status bit.

The setup is reliable:
* The event detect register is set
* The pin's mode is changed to Input (rising edge which tells the device to pull the wire low)
* A time-stamp (t0) is taken (ARM counter @ 250 MHz)
* The event status register is polled for at least 60us

The edge always appears on the logic analyzer but, as said above, not always (about 1/10) in the event bit. As soon as I disable all ARM (1,2) and VC (3,16,18,32,56,57) interrupts for the critical period, the event bit is always set. I tried various pins. Hence, I'm under the impression, a kernel module interferes.

The nice thing about the Pi is its easy peripheral access from a vanilla Linux' userland process. However, I'm in trouble if the kernel does also access these peripherals (I mean the peripherals that relate to the Pin header). I didn't "activate" any kernel modules in boot/config.txt -- which unfortunately doesn't seem to be enough.

Comments related to this (potential) issue are highly appreciated. Thank you!

User avatar
DougieLawson
Posts: 40577
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Kernel seems to reset the Event Detect Status Register

Sun Sep 10, 2017 1:25 pm

Are you able to recreate your failure with a current Raspbian Stretch 4.9.48 kernel?
Any language using left-hand whitespace for syntax is ridiculous

Any DMs sent on Twitter will be answered next month.
Fake doctors - are all on my foes list.

Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Return to “Raspberry Pi OS”