Skip to content

Commit

Permalink
Remove problematic IO2 3V3 toggling (again) as GPS EN pin (#3317)
Browse files Browse the repository at this point in the history
* Remove problematic IO2 3V3 toggling (again) as GPS EN pin

* Comment

* Trunk
  • Loading branch information
thebentern authored Mar 2, 2024
1 parent a583483 commit 905718e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
13 changes: 0 additions & 13 deletions src/gps/GPS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,6 @@ bool GPS::setup()
if (!didSerialInit) {
#if !defined(GPS_UC6580)

#if defined(RAK4630) && defined(PIN_3V3_EN)
// If we are using the RAK4630 and we have no other peripherals on the I2C bus or module interest in 3V3_S,
// then we can safely set en_gpio turn off power to 3V3 (IO2) to hard sleep the GPS
if (rtc_found.port == ScanI2C::DeviceType::NONE && rgb_found.type == ScanI2C::DeviceType::NONE &&
accelerometer_found.port == ScanI2C::DeviceType::NONE && !moduleConfig.detection_sensor.enabled &&
!moduleConfig.telemetry.air_quality_enabled && !moduleConfig.telemetry.environment_measurement_enabled &&
config.power.device_battery_ina_address == 0 && en_gpio == 0) {
LOG_DEBUG("Since no problematic peripherals or interested modules were found, setting power save GPS_EN to pin %i\n",
PIN_3V3_EN);
en_gpio = PIN_3V3_EN;
}
#endif

if (tx_gpio && gnssModel == GNSS_MODEL_UNKNOWN) {
LOG_DEBUG("Probing for GPS at %d \n", serialSpeeds[speedSelect]);
gnssModel = probe(serialSpeeds[speedSelect]);
Expand Down
1 change: 1 addition & 0 deletions variants/rak4631/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ SO GPIO 39/TXEN MAY NOT BE DEFINED FOR SUCCESSFUL OPERATION OF THE SX1262 - TG
#define NRF_APM

// enables 3.3V periphery like GPS or IO Module
// Do not toggle this for GPS power savings
#define PIN_3V3_EN (34)

// RAK1910 GPS module
Expand Down

0 comments on commit 905718e

Please sign in to comment.