whitecatboard / Lua-RTOS-ESP32

Lua RTOS for ESP32
Other
1.18k stars 221 forks source link

No pullup for GPIO34 #300

Closed Mynogs closed 4 years ago

Mynogs commented 4 years ago

I try to activate the pullup on GPIO34 (Wrover, Generic image):

pio.port.setdir(pio.INPUT, 34)
pio.pin.setpull(pio.PULLUP, 34)

But the pin is not pulled up. It is still at GND. With a simple test scrip I can read the pin value. With GND I read 0, with +3,3V I read 1.

Whats my fault? I take a short look in the source code, but I can't see anything thats wrong. It looks the same effect occures at pin no 35, 36 and 39. But I don't doublechecked it. All these pins are input only pins.

the0ne commented 4 years ago

Lua-RTOS can't do any more magic than the HW it runs upon. The documentation of your ESP32 clearly states the following:

GPIO34-39 can only be set as input mode and do not have software pullup or pulldown functions.

the0ne commented 4 years ago

Feel free to close this issue.

Mynogs commented 4 years ago

@the0ne I had suspected that, but I could not find it in the documentation. Many thanks!