GPIO on UP Squared - its terrible!

Options
aanistratenko
aanistratenko New Member Posts: 8

I need to use GPIO on UP Squared with Ubuntu 22 server - reed many sources and try any days without success(((

I have problem with pin for LED:
-gpioset gpiochip4 27=0 or 1 - turn on led onle for amount 0.5sec
-doesn't matter led connect to 3.3 or gnd.
-try some modes "push-pull|open-drain"
-try without led only with oscilloscope for little current - only one pulse
How to turn on GPIO for a long time or for pulse with my duration?

Documentation is very bad - no one workable instuctions!
1 https://github.com/up-board/up-community/wiki/Ubuntu_20.04
Have no docs for Ubuntu 22, dont need to change core, because driver pincrtl is present in default
2 No any information for HAT GPIO parameters in BIOS!
Is there a need to change them?
I set up in BIOS Output mode, but in gpioinfo it still as Input!
3 https://github.com/up-board/up-community/wiki/40Pin-Header
No information that driver pincrtl in in core.
https://github.com/up-board/up-community/wiki/How-to-use-the-peripherals-on-40-Pin-Header
No samples for use pincrtl.
Sample with Bash "echo 26 > /sys/class/gpio/export" - dont work!
"/sys/class/gpio# ls" - dont include simple GPIO, only chips
"export gpiochip0 gpiochip779 gpiochip822 gpiochip869 gpiochip946 unexport"
4 https://github.com/up-board/up-community/wiki/Pinout
Pionouts are bad - for example pin 13:

  • in table pin13-up pinout gpio4-linux gpio 27
  • in BIOS pin13-gpio5
  • What is correct?
Tagged:

Comments

  • aanistratenko
    aanistratenko New Member Posts: 8
    Options

    Also I have problem with return back ports to functional mode - pins 3,5 dont return to i2c after reboot.
    In docs i see "Warning: The current pinctrl driver implementation does not allow to restore a pin in function mode (e.g. UART) once it has been already switched to GPIO mode until the operating system is rebooted" - but it dont work.
    How I can return to i2c mode?

  • aanistratenko
    aanistratenko New Member Posts: 8
    Options

    I made some experiments and saw that i2c dont work after install package gpiod !
    But after remove package i2c still dint work(((
    What tools can i use with gpio and i2c simultaneously ?