Skip to content

Commit

Permalink
Fix STM32WL TCXO setting; enable logs and modules (meshtastic#6063)
Browse files Browse the repository at this point in the history
Co-authored-by: Ben Meadors <[email protected]>
  • Loading branch information
2 people authored and dchokola committed Feb 16, 2025
1 parent 0cb334c commit e9eead8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
18 changes: 11 additions & 7 deletions arch/stm32/stm32.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,26 @@ build_type = release

;board_build.flash_offset = 0x08000000

build_flags =
build_flags =
${arduino_base.build_flags}
-Wl,--undefined=vTaskSwitchContext
-flto
-Isrc/platform/stm32wl -g
-DMESHTASTIC_MINIMIZE_BUILD
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR
-DMESHTASTIC_EXCLUDE_INPUTBROKER
-DMESHTASTIC_EXCLUDE_I2C
-DMESHTASTIC_EXCLUDE_POWERMON
-DMESHTASTIC_EXCLUDE_SCREEN
-DMESHTASTIC_EXCLUDE_MQTT
-DMESHTASTIC_EXCLUDE_BLUETOOTH
-DMESHTASTIC_EXCLUDE_PKI
-DMESHTASTIC_EXCLUDE_GPS
; -DDEBUG_MUTE
; -DVECT_TAB_OFFSET=0x08000000
-DconfigUSE_CMSIS_RTOS_V2=1
; -DSPI_MODE_0=SPI_MODE0
-fmerge-all-constants
-ffunction-sections
-fdata-sections
build_src_filter =

build_src_filter =
${arduino_base.build_src_filter} -<platform/esp32/> -<nimble/> -<mesh/api/> -<mesh/wifi/> -<mesh/http/> -<modules/esp32> -<mesh/eth/> -<input> -<buzz> -<modules/RemoteHardwareModule.cpp> -<platform/nrf52> -<platform/portduino> -<platform/rp2xx0> -<mesh/raspihttp>

board_upload.offset_address = 0x08000000
Expand Down
5 changes: 4 additions & 1 deletion src/mesh/STM32WLE5JCInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,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
setTCXOVoltage(1.7);

lora.setRfSwitchTable(rfswitch_pins, rfswitch_table);

if (power > STM32WLx_MAX_POWER) // This chip has lower power limits than some
Expand All @@ -39,4 +42,4 @@ bool STM32WLE5JCInterface::init()
return res == RADIOLIB_ERR_NONE;
}

#endif // ARCH_STM32WL
#endif // ARCH_STM32WL
3 changes: 0 additions & 3 deletions src/mesh/STM32WLE5JCInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ class STM32WLE5JCInterface : public SX126xInterface<STM32WLx>
virtual bool init() override;
};

// https://github.com/Seeed-Studio/LoRaWan-E5-Node/blob/main/Middlewares/Third_Party/SubGHz_Phy/stm32_radio_driver/radio_driver.c
static const float tcxoVoltage = 1.7;

/* https://wiki.seeedstudio.com/LoRa-E5_STM32WLE5JC_Module/
* Wio-E5 module ONLY transmits through RFO_HP
* Receive: PA4=1, PA5=0
Expand Down

0 comments on commit e9eead8

Please sign in to comment.