From 042543eb25fd66410e942430c6eab0519adf61d0 Mon Sep 17 00:00:00 2001 From: Lewis He Date: Tue, 9 Dec 2025 19:39:27 +0800 Subject: [PATCH] Fixed the issue where T-Echo did not completely shut down peripherals upon power-off. (#8524) Co-authored-by: Ben Meadors --- src/platform/nrf52/main-nrf52.cpp | 10 ++++++++++ variants/nrf52840/t-echo/variant.h | 3 +-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/platform/nrf52/main-nrf52.cpp b/src/platform/nrf52/main-nrf52.cpp index c03cc4454..5d1ba20ba 100644 --- a/src/platform/nrf52/main-nrf52.cpp +++ b/src/platform/nrf52/main-nrf52.cpp @@ -335,6 +335,16 @@ void cpuDeepSleep(uint32_t msecToWake) if (Serial1) // A straightforward solution to the wake from deepsleep problem Serial1.end(); #endif + +#ifdef TTGO_T_ECHO + // To power off the T-Echo, the display must be set + // as an input pin; otherwise, there will be leakage current. + pinMode(PIN_EINK_CS, INPUT); + pinMode(PIN_EINK_DC, INPUT); + pinMode(PIN_EINK_RES, INPUT); + pinMode(PIN_EINK_BUSY, INPUT); +#endif + setBluetoothEnable(false); #ifdef RAK4630 diff --git a/variants/nrf52840/t-echo/variant.h b/variants/nrf52840/t-echo/variant.h index 4f3a53ebf..37d3368c3 100644 --- a/variants/nrf52840/t-echo/variant.h +++ b/variants/nrf52840/t-echo/variant.h @@ -181,7 +181,7 @@ External serial flash WP25R1635FZUIL0 #define PIN_GPS_STANDBY (32 + 2) // An output to wake GPS, low means allow sleep, high means force wake // Seems to be missing on this new board -// #define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS +#define PIN_GPS_PPS (32 + 4) // Pulse per second input from the GPS #define GPS_TX_PIN (32 + 9) // This is for bits going TOWARDS the CPU #define GPS_RX_PIN (32 + 8) // This is for bits going TOWARDS the GPS @@ -203,7 +203,6 @@ External serial flash WP25R1635FZUIL0 #define PIN_SPI_MOSI (0 + 22) #define PIN_SPI_SCK (0 + 19) -#define PIN_PWR_EN (0 + 6) // To debug via the segger JLINK console rather than the CDC-ACM serial device // #define USE_SEGGER