GPIO donot function on Raspberry Pi 4

lubos
2020-09-17
2020-12-15
  • lubos

    lubos - 2020-09-17

    Hello,

    I have problem to control GPIO pins on Raspberry Pi 4.
    I use latest CODESYS runtime Version 3.5.16.10.

    I can control GPIO from RPi 4 system (e.g. Python code), but not from CODESYS.
    I tried older runtime Versions too, another RPi 4 device, but nothing helps.

    On Raspberry 3B+ function everething without problem.

    Did You tried this or do You how to solve this issue?

    Thanks.

     
  • mosfet

    mosfet - 2020-12-05

    Hello,
    I also have the same problem. On the raspberry pi4 model B, the GPIOs controlled with Codesys do not work while if controlled with Python scripts they work correctly. Can someone help me?
    Thanks.

     
  • lubos

    lubos - 2020-12-07

    Hello,
    I solved this issue with use of new CODESYS runtime V3.5.16.20.
    There I used new GPIO driver: "GPIOs B+/Pi2". (The older was named "GPIOs A/B" and worked me only on RPi3B+).
    Lubos

     

    Last edit: lubos 2020-12-07
  • mosfet

    mosfet - 2020-12-07

    But to enable the GPIO working with codesys, on raspberry I have to configure something? Upgrading to that version still doesn't work for me.

     
  • lubos

    lubos - 2020-12-07

    Here is detailed picture how to change GPIO control... Update Device for GPIO:

     

    Last edit: lubos 2020-12-07
  • mosfet

    mosfet - 2020-12-07

    thank you for the help but even doing the update (as you showed in the figure) the result does not change. I am really so sorry because i thought it worked without problems.

     
  • lubos

    lubos - 2020-12-07

    OK, can be, that You have another Problem.. but this need more description of Your issue..

    In Raspbian is neccessary to allow control of GPIO in "Interfaces - Raspberry Pi Configuration". I hope, this You have set if You uses Python.

    Which CODESYS and runtime version do You use?
    Do You set outputs or read inputs?
    Can You send some printscreens or whole project is best...

     
  • tomj

    tomj - 2020-12-15

    Sorry to butt in here.
    I had same problem to control GPIO on Raspberry Pi 4,
    but I have solved it fortunately.

    The following is just for your information.
    In my case, it is solved by downgrading Raspberry Pi OS.
    What I did was reinstall Raspberry Pi OS by using old Image
    (2020-02-05-raspbian-buster.zip) downloading from Raspberry
    Pi Site and didn't update module while I was installing the OS.

    My Raspberry Pi 4 is ...
    pi@raspberrypi:~ $ cat /proc/device-tree/model
    Raspberry Pi 4 Model B Rev 1.4

    • My environment which GPIO is working
      Codesys Control for Rasberry Pi 3.5.16.20
      Raspberry Pi OS : debian_version 10.2
      (displayed by following command)
      pi@raspberrypi:~ $ cat /etc/debian_version
      10.2

    • My environment which GPIO did not work
      Codesys Control for Rasberry Pi 3.5.16.20
      Raspberry Pi OS :debian_version 10.4
      (displayed by following command)
      pi@raspberrypi:~ $ cat /etc/debian_version
      10.4

     

Log in to post a comment.