GPIO interrupts

Started by Chris, October 13, 2020, 11:03:43 PM

Previous topic - Next topic

Chris

There are several posts in this forum concerning this topic, but none of them could help so far.
Problem: I exported all 75 GPIOs, but none of the /sys/class/gpio/gpio..../ folders contain an "edge" file for watching rising or falling levels.
Do I have to modify "script.fex" and which details?
I am running a A10 Lime on Debian Wheezy with Kernel 3.4.90
I also compiled a new Sunxi Kernel 3.4.104 with same behaviour.
Are there kernel options to enable "edge" triggering?
Any help is welcome.
Thanks!

LubOlimex

Did you use one of our images? You can find them here:

http://images.olimex.com/release/a10/

Instead of using the pins directly, maybe try this A10 pyhton pypi library, it might be more productive:

https://pypi.org/project/pyA10Lime/
Technical support and documentation manager at Olimex

Chris

Quote from: LubOlimex on October 14, 2020, 09:18:48 AMDid you use one of our images? You can find them here:
http://images.olimex.com/release/a10/
Yes, I did - same story: None of the GPIOxx folders contains an "edge" file for capturing level changes.  :'(

Quote from: LubOlimex on October 14, 2020, 09:18:48 AMInstead of using the pins directly, maybe try this A10 pyhton pypi library, it might be more productive:
https://pypi.org/project/pyA10Lime/
I can't see anything concerning interrupt handling in this package...  :o

JohnS

Maybe you need to create the edge file?

There are net examples showing it...

John

Chris


JohnS

I just typed stuff into google like linux gpio edge interrupt

It's amazing what works!

John

Chris

Guess what I have done before?
So you have no idea but give "good" advice.  >:(

Main tenor of all google search results is that it depends on your hardware if "edge" files exist. The file exists only if the GPIO pin can be configured as an interrupt generating input pin.
Because it is hardware dependent THIS HERE is the right place to ask.
Please only answer if you have a constructive solution.
Thank you.

JohnS

I have every idea - the result came up instantly and as it was trivially easy I didn't save the outcome.

Some you lose, apparently.

John

JohnS

Well there's a thing - did the google thing again and hey up pops multiple solutions!!

I cannot imagine why it fails for you.  I'm thinking google hates you?

https://www.linux.com/training-tutorials/beaglebone-black-how-get-interrupts-through-linux-gpio/

What happens when you try it?

John

JohnS

#9
Quote from: Chris on October 16, 2020, 09:19:03 PMThe file exists only if the GPIO pin can be configured as an interrupt generating input pin.

Try creating it and see if it works.

If it doesn't it's because the CPU or the Linux driver doesn't allow/support it - and Olimex aren't responsible in either case.  To get further read the hardware docs for the CPU / figure out if the driver needs changing (read the source).

Quote from: Chris on October 16, 2020, 09:19:03 PMBecause it is hardware dependent THIS HERE is the right place to ask.
False.  Olimex didn't create either the CPU or Linux kernel driver.

John

Chris

Quote from: undefinedhttps://www.linux.com/training-tutorials/beaglebone-black-how-get-interrupts-through-linux-gpio/
I see you're trying hard, but this solution is not based on interrupts. It may be a workaround, but is off topic for my question. But nevertheless thanks for the idea.

Quote from: undefinedTo get further read the hardware docs for the CPU / figure out if the driver needs changing (read the source).
If I could do this, I wouldn't ask here. You may be a kernel driver developer, I am not.

Quote from: undefinedFalse. Olimex didn't create either the CPU or Linux kernel driver.
So who to ask then? Allwinner? Linus Torvalds?
I didn't say Olimex is responsible, but HERE are the people with experience in all the involved components, e.g. how to modify the required script.fex file for attaching interrupts to GPIOs.

JohnS

#11
Yeah, ask Allwinner etc or the kernel driver list or some such.

i.e. someone actually involved in the parts you want to interact with.

Then when you find the answer you can be helpful rather than abusive and post the answer here.

BTW as you use fex you're using something no longer supported by Olimex or indeed almost anyone.

John

LubOlimex

Unfortunately, we don't have much experience with the external interrupts on the Allwinner chips ourselves. As a rule everything that we make or find out we publish. Also we are no longer maintaining the 3.4.x images, so I don't see any features being added.

I have contacts with few embedded Linux developers with experience with the boards, I can give you their contacts, they might offer better advice or help, but probably not for free.
Technical support and documentation manager at Olimex

Chris

Quote from: LubOlimex on October 19, 2020, 08:56:59 AMI have contacts with few embedded Linux developers with experience with the boards, I can give you their contacts, they might offer better advice or help, but probably not for free.
Thanks for your kind offer, but finally I managed it by myself.