From 86c9c1478d684f9a275fb190b54fa5e1ededa82d Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 2 Mar 2025 20:32:57 +0200 Subject: [PATCH 1/6] Update STM32WLE5JCInterface.cpp --- src/mesh/STM32WLE5JCInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesh/STM32WLE5JCInterface.cpp b/src/mesh/STM32WLE5JCInterface.cpp index ad1f675b6..374832fee 100644 --- a/src/mesh/STM32WLE5JCInterface.cpp +++ b/src/mesh/STM32WLE5JCInterface.cpp @@ -19,7 +19,9 @@ bool STM32WLE5JCInterface::init() RadioLibInterface::init(); // https://github.com/Seeed-Studio/LoRaWan-E5-Node/blob/main/Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver/radio_driver.c + #if (!defined(_VARIANT_RAK3172_)) setTCXOVoltage(1.7); + #endif lora.setRfSwitchTable(rfswitch_pins, rfswitch_table); @@ -42,4 +44,4 @@ bool STM32WLE5JCInterface::init() return res == RADIOLIB_ERR_NONE; } -#endif // ARCH_STM32WL \ No newline at end of file +#endif // ARCH_STM32WL From c7aa7ca9ab8a2acbd1a29f0ee3cdfda0a5fd35c2 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 2 Mar 2025 20:35:01 +0200 Subject: [PATCH 2/6] Update stm32.ini --- arch/stm32/stm32.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/stm32/stm32.ini b/arch/stm32/stm32.ini index ef38c3084..d5e615f5f 100644 --- a/arch/stm32/stm32.ini +++ b/arch/stm32/stm32.ini @@ -20,7 +20,7 @@ build_flags = -DMESHTASTIC_EXCLUDE_MQTT -DMESHTASTIC_EXCLUDE_BLUETOOTH -DMESHTASTIC_EXCLUDE_GPS - -DDEBUG_MUTE + ;-DDEBUG_MUTE -fmerge-all-constants -ffunction-sections -fdata-sections @@ -39,4 +39,4 @@ lib_deps = lib_ignore = mathertel/OneButton@2.6.1 - Wire \ No newline at end of file + Wire From 57c2ded86325b6ea8b031e8d842a420b2c5123c4 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 2 Mar 2025 20:35:25 +0200 Subject: [PATCH 3/6] Update platformio.ini --- variants/rak3172/platformio.ini | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/variants/rak3172/platformio.ini b/variants/rak3172/platformio.ini index 2cf03da2e..456697aef 100644 --- a/variants/rak3172/platformio.ini +++ b/variants/rak3172/platformio.ini @@ -5,9 +5,6 @@ board_upload.maximum_size = 233472 ; reserve the last 28KB for filesystem build_flags = ${stm32_base.build_flags} -Ivariants/rak3172 - -DSERIAL_UART_INSTANCE=1 - -DPIN_SERIAL_RX=PB7 - -DPIN_SERIAL_TX=PB6 -DHAL_DAC_MODULE_ONLY -DHAL_RNG_MODULE_ENABLED -DRADIOLIB_EXCLUDE_SX128X=1 @@ -23,5 +20,4 @@ build_flags = -DMESHTASTIC_EXCLUDE_POWERMON=1 ;-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF ;-DCFG_DEBUG - -upload_port = stlink \ No newline at end of file +upload_port = stlink From 6878893e0a777a6bed08fc45bfc9a5df02c5bae3 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 2 Mar 2025 20:35:49 +0200 Subject: [PATCH 4/6] Update variant.h --- variants/rak3172/variant.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/variants/rak3172/variant.h b/variants/rak3172/variant.h index 21de65b2c..b473d430c 100644 --- a/variants/rak3172/variant.h +++ b/variants/rak3172/variant.h @@ -1,3 +1,8 @@ +/* +STM32WLE5 Core Module for LoRaWAN® RAK3372 +https://store.rakwireless.com/products/wisblock-core-module-rak3372 +*/ + /* This variant is a work in progress. Do not expect a working Meshtastic device with this target. @@ -9,4 +14,7 @@ Do not expect a working Meshtastic device with this target. #define USE_STM32WLx #define MAX_NUM_NODES 10 -#endif \ No newline at end of file +#define LED_PIN PA0 //Green LED +#define LED_STATE_ON 1 + +#endif From d65567afe60df80964636bcab4dc24b37f7bea27 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 2 Mar 2025 20:55:02 +0200 Subject: [PATCH 5/6] Update variant.h --- variants/rak3172/variant.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/variants/rak3172/variant.h b/variants/rak3172/variant.h index b473d430c..21676f9cf 100644 --- a/variants/rak3172/variant.h +++ b/variants/rak3172/variant.h @@ -14,7 +14,7 @@ Do not expect a working Meshtastic device with this target. #define USE_STM32WLx #define MAX_NUM_NODES 10 -#define LED_PIN PA0 //Green LED +#define LED_PIN PA0 // Green LED #define LED_STATE_ON 1 #endif From c3d104bc3480e4644033e1d2561c36b76ac886c8 Mon Sep 17 00:00:00 2001 From: Mark Trevor Birss Date: Sun, 2 Mar 2025 20:55:27 +0200 Subject: [PATCH 6/6] Update STM32WLE5JCInterface.cpp --- src/mesh/STM32WLE5JCInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesh/STM32WLE5JCInterface.cpp b/src/mesh/STM32WLE5JCInterface.cpp index 374832fee..6a340dd28 100644 --- a/src/mesh/STM32WLE5JCInterface.cpp +++ b/src/mesh/STM32WLE5JCInterface.cpp @@ -18,10 +18,10 @@ bool STM32WLE5JCInterface::init() { RadioLibInterface::init(); - // https://github.com/Seeed-Studio/LoRaWan-E5-Node/blob/main/Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver/radio_driver.c - #if (!defined(_VARIANT_RAK3172_)) +// https://github.com/Seeed-Studio/LoRaWan-E5-Node/blob/main/Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver/radio_driver.c +#if (!defined(_VARIANT_RAK3172_)) setTCXOVoltage(1.7); - #endif +#endif lora.setRfSwitchTable(rfswitch_pins, rfswitch_table);