GPIO Interrupts

John MeltonJohn Melton Posts: 1New Member
How many interrupts can be assigned to GPIO pins? For rotary encoders I need 4 interrupts per encoder for performance and I am looking at 4 encoders and 8 push buttons.

Comments

  • Dan O'DonovanDan O'Donovan Posts: 218Emutex mod
    Interrupts can be enabled on any of the 28 GPIO pins. From user-space, you can get falling/rising/both edge-triggered notifications. At kernel level, you can also get level-triggered notifications. Let me know if you need further details.
  • TheoTheo Posts: 3New Member
    I dont know how John was using his GPIO. but my issue is the next one.
    I have 3 push buttons and 5 input connected to a PLC(no problems on the interface board, I have checked it many times).
    that makes 8 inputs.

    I use Python and RPi.GPIO(up-board last version).
    I create 1 callback function wich is printing the triggering channel number, and the actual value of the 8 inputs.
    channel number is wrong most of the time, I cant figure out why.
    does any one have an idea? For me it seems to be a bug of the RPi.GPIO lib

    my code and the output log are attached
  • TheoTheo Posts: 3New Member
    That's an issue with the python lib provided by Up-Board.
    The same code is working on Raspberry-pi 3
  • TarasTaras Posts: 6New Member
    how can i know wich interrupt has occured in my LKM ? (in interrupt handler function)
Sign In or Register to comment.