mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-08-14 22:29:52 +00:00
The M6's L76K GPS streams NMEA at 9600 baud on its own, but the firmware reported no GPS. Root cause: pin 29 (PIN_GPS_RESET / the module's REINIT line) was driven HIGH, which holds the L76K silent so it never emits any sentences and detection fails. variant.cpp drove pin 29 HIGH at boot, and because PIN_GPS_RESET was defined, MicroNMEALocationProvider also drove it HIGH in begin(). Bench testing on a sealed M6 (passive NMEA capture, no logic analyzer) confirmed: pin 29 driven HIGH = 0 bytes; pin 29 floating = full NMEA stream. Define GPS_RESET (-1) so the location provider never touches pin 29, and stop driving it in initVariant. This matches the Meshtastic M6 variant, which leaves the same pin as a floating input.
38 lines
1.1 KiB
C++
38 lines
1.1 KiB
C++
#include "variant.h"
|
|
#include "wiring_constants.h"
|
|
#include "wiring_digital.h"
|
|
|
|
const uint32_t g_ADigitalPinMap[] = {
|
|
0xff, 0xff, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13,
|
|
14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
|
|
27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39,
|
|
40, 41, 42, 43, 44, 45, 46, 47
|
|
};
|
|
|
|
void initVariant() {
|
|
pinMode(PIN_PWR_EN, OUTPUT);
|
|
digitalWrite(PIN_PWR_EN, HIGH);
|
|
|
|
pinMode(QSPI_FLASH_EN, OUTPUT);
|
|
digitalWrite(QSPI_FLASH_EN, HIGH);
|
|
|
|
// For now stick adc_ctrl to fixed value
|
|
pinMode(PIN_ADC_CTRL, OUTPUT);
|
|
digitalWrite(PIN_ADC_CTRL, LOW);
|
|
|
|
pinMode(PIN_LED_RED, OUTPUT);
|
|
pinMode(PIN_LED_BLUE, OUTPUT);
|
|
digitalWrite(PIN_LED_BLUE, LOW);
|
|
digitalWrite(PIN_LED_RED, LOW);
|
|
|
|
// gps
|
|
pinMode(PIN_GPS_STANDBY, OUTPUT);
|
|
digitalWrite(PIN_GPS_STANDBY, HIGH);
|
|
pinMode(PIN_GPS_EN, OUTPUT);
|
|
digitalWrite(PIN_GPS_EN, HIGH);
|
|
// PIN_GPS_RESET (pin 29 / REINIT) is intentionally left floating (input).
|
|
// Driving it HIGH holds the L76K silent, so it never streams NMEA and the
|
|
// firmware reports "no GPS". Letting it float lets the module run, matching
|
|
// the Meshtastic M6 variant. See GPS_RESET (-1) in variant.h.
|
|
}
|