Internal pull-up

Started by Noone, February 05, 2023, 01:21:46 PM

Previous topic - Next topic

Noone

Hi,
I'm not able to use internal pull-up for GPIO-pins.

With Python code:
from pyA64.gpio import gpio
from pyA64.gpio import port
gpio.init()
gpio.setcfg(port.PE12, gpio.INPUT)
gpio.pullup(port.PE12, gpio.PULLUP)
gpio.input(port.PE12)

I always get '0' if nothing is connected to the line. With external pull-up everything works.

I'm I missing something here?


LubOlimex

Maybe it is not good enough for your application. What is the value of the external pull up that you connect? Maybe the internal has different value.

Did you try with other GPIO ports?
Technical support and documentation manager at Olimex

Noone

If I leave pin fully unconnected, pull-up is still not working. I tested with ports defined in
from pyA64.gpio import port
I'm using image
A64-OLinuXino-focal-minimal-20210127-100834.img


LubOlimex

What is the value of the external pull up that you connect? Maybe the internal has different value?

What do you expect is the value of the internal pull-up is?
Technical support and documentation manager at Olimex

Noone

Problem solved 8)

Documentation linked from A64-OLinuXino product page is outdated.

Document (revision G, December 2022) behind the link (https://github.com/OLIMEX/OLINUXINO/blob/master/DOCUMENTS/OLIMAGE/Olimage-guide.pdf gives outdated instructions for Python.

Pull-ups (and everything else) work well with python3-gpiod https://pypi.org/project/gpiod/.

Brgs,
 Noone