diff --git a/variants/rak3x72/platformio.ini b/variants/rak3x72/platformio.ini index d69ec96b9..666f1f8f2 100644 --- a/variants/rak3x72/platformio.ini +++ b/variants/rak3x72/platformio.ini @@ -10,7 +10,7 @@ build_flags = ${stm32_base.build_flags} -D RX_BOOSTED_GAIN=true -D STM32WL_ENABLE_SMPS ; run the radio from the SMPS/DC-DC regulator (needs the VLXSMPS coil) -D STM32WL_SLEEP_STOP0 ; sleep in Stop0 so the SMPS stays active during continuous RX -; -D STM32WL_TCXO_VOLTAGE=1.6 ; defaults to 0 if undef +; -D STM32WL_TCXO_VOLTAGE=1.8 ; override the auto-detected default from target.cpp ; -D LORA_TX_POWER=14 ; Defaults to 22 for HP, 14 is for LP version -I variants/rak3x72 build_src_filter = ${stm32_base.build_src_filter} diff --git a/variants/rak3x72/target.cpp b/variants/rak3x72/target.cpp index e55543a32..30a17aa2e 100644 --- a/variants/rak3x72/target.cpp +++ b/variants/rak3x72/target.cpp @@ -24,9 +24,11 @@ SensorManager sensors; #define LORA_CR 5 #endif +// Auto-detect the oscillator. begin() is given a TCXO voltage; RadioLib falls +// back to the crystal if it fails to start, so one build runs on both the +// crystal RAK3172 and the TCXO -T. A hard-coded 0 leaves the -T failing (-707). #ifndef STM32WL_TCXO_VOLTAGE - // TCXO set to 0 for RAK3172 - #define STM32WL_TCXO_VOLTAGE 0 + #define STM32WL_TCXO_VOLTAGE 1.8 #endif #ifndef LORA_TX_POWER