From dde96e3ce92145774e7af14d5b5f3d9e77d3d758 Mon Sep 17 00:00:00 2001 From: Jody Bentley Date: Mon, 29 Jun 2026 15:28:45 -0400 Subject: [PATCH] thinknode_m1: stop GPS code from driving the LoRa radio power pin On the M1, pin 37 is the LoRa radio power enable (SX126X_POWER_EN, driven HIGH by ThinkNodeM1Board), but variant.h also defined PIN_GPS_RESET (37) -- the same pin. Because the M1 builds its location provider with default args, MicroNMEALocationProvider drives that pin as if it were the GPS reset: begin() drives it HIGH and stop() drives it LOW. So turning GPS off (e.g. via the GPS switch) cuts power to the LoRa radio. The M1 GPS has no MCU-controlled reset line. Remove the bogus PIN_GPS_RESET and set GPS_RESET (-1) so the provider never touches pin 37; the radio keeps it powered. GPS is unaffected (the L76K streams NMEA without a reset pulse; verified on hardware -- 3D fix in ~80s). --- variants/thinknode_m1/variant.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/variants/thinknode_m1/variant.h b/variants/thinknode_m1/variant.h index f7f52a6a59..224502044b 100644 --- a/variants/thinknode_m1/variant.h +++ b/variants/thinknode_m1/variant.h @@ -137,7 +137,12 @@ extern const int SCK; #define PIN_GPS_RX (40) #define PIN_GPS_TX (41) #define GPS_EN (34) -#define PIN_GPS_RESET (37) +// NOTE: pin 37 is the LoRa radio power enable (SX126X_POWER_EN), NOT a GPS reset. +// It must not be defined as PIN_GPS_RESET: the location provider drives the GPS +// reset pin in begin()/stop(), so doing so would toggle the radio's power -- in +// particular, turning GPS off would cut power to the LoRa radio. The M1 GPS has +// no MCU-controlled reset line, so tell the provider there is none. +#define GPS_RESET (-1) #define PIN_GPS_PPS (36) #define PIN_GPS_STANDBY (34) #define PIN_GPS_SWITCH (33)