However when using the arduino framework and setting one to an input with internal pullups they do not pull high and spike up randomly (not just raw noise) to 1.3V and sit at 0.7V.
I've also used 10k external pullups and found the behavior doesn't change. I'm using this test code
Code: Select all
#include <Arduino.h>
void setup()
{
Serial.begin(115200);
delay(1000);
Serial.println("Running.");
pinMode(PIN_16, OUTPUT);
pinMode(PIN_1, INPUT_PULLUP);
}
void loop()
{
delay(3000);
Serial.print("Toggle 16 HIGH, 1...");
int value = digitalRead(PIN_1);
digitalWrite(PIN_16, HIGH);
Serial.println(value, BIN);
delay(3000);
Serial.print("Toggle 16 low, 1...");
value = digitalRead(PIN_1);
digitalWrite(PIN_16, LOW);
Serial.println(value, BIN);
}
I'm really at a loss with what is happening here with the single input pins and I have been working on this for a long time. In this example I can swap the PIN1 and PIN16 to just check the right ones are being controlled and measured on my oscilloscope. The outputs behave as expected but if either one is an input, it does not pull high and has short pulses high with nothing connected.Processing lilygo-t-display-s3 (platform: espressif32; board: lilygo-t-display-s3; framework: arduino)
---------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards ... ay-s3.html
PLATFORM: Espressif 32 (6.8.1) > LilyGo T-Display-S3
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, esp-builtin, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 @ 3.20017.0 (2.0.17)
- tool-esptoolpy @ 1.40501.0 (4.5.1)
- toolchain-riscv32-esp @ 8.4.0+2021r2-patch5
- toolchain-xtensa-esp32s3 @ 8.4.0+2021r2-patch5
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 33 compatible libraries
Scanning dependencies...
No dependencies
Building in release mode
Retrieving maximum program size .pio/build/lilygo-t-display-s3/firmware.elf
Checking size .pio/build/lilygo-t-display-s3/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 5.6% (used 18396 bytes from 327680 bytes)
Flash: [ ] 3.9% (used 253829 bytes from 6553600 bytes)
Anyone have any ideas?