Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/mesh/STM32WLE5JCInterface.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#include "STM32WLE5JCInterface.h"
#include "configuration.h"

#ifdef ARCH_STM32WL
#include "STM32WLE5JCInterface.h"
#include "error.h"

#ifndef STM32WLx_MAX_POWER
#define STM32WLx_MAX_POWER 22
#endif

#ifdef ARCH_STM32WL

STM32WLE5JCInterface::STM32WLE5JCInterface(LockingArduinoHal *hal, RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq,
RADIOLIB_PIN_TYPE rst, RADIOLIB_PIN_TYPE busy)
: SX126xInterface(hal, cs, irq, rst, busy)
Expand Down
13 changes: 2 additions & 11 deletions src/mesh/STM32WLE5JCInterface.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#pragma once

#include "SX126xInterface.h"

#ifdef ARCH_STM32WL
#include "SX126xInterface.h"
#include "rfswitch.h"

/**
* Our adapter for STM32WLE5JC radios
Expand All @@ -16,13 +16,4 @@ class STM32WLE5JCInterface : public SX126xInterface<STM32WLx>
virtual bool init() override;
};

/* https://wiki.seeedstudio.com/LoRa-E5_STM32WLE5JC_Module/
* Wio-E5 module ONLY transmits through RFO_HP
* Receive: PA4=1, PA5=0
* Transmit(high output power, SMPS mode): PA4=0, PA5=1 */
static const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PA4, PA5, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};

static const Module::RfSwitchMode_t rfswitch_table[4] = {
{STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};

#endif // ARCH_STM32WL
2 changes: 0 additions & 2 deletions variants/stm32/CDEBYTE_E77-MBL/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ build_flags =
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
-DMESHTASTIC_EXCLUDE_I2C=1
-DMESHTASTIC_EXCLUDE_GPS=1
;-DPIO_FRAMEWORK_ARDUINO_NANOLIB_FLOAT_PRINTF
;-DCFG_DEBUG

upload_port = stlink
9 changes: 9 additions & 0 deletions variants/stm32/CDEBYTE_E77-MBL/rfswitch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// From E77-900M22S Product Specification
// https://www.cdebyte.com/pdf-down.aspx?id=2963
// Note 1: PA6 and PA7 pins are used as internal control RF switches of the module, PA6 = RF_TXEN, PA7 = RF_RXEN, RF_TXEN=1
// RF_RXEN=0 is the transmit channel, and RF_TXEN=0 RF_RXEN=1 is the receiving channel

static const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PA7, PA6, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};

static const Module::RfSwitchMode_t rfswitch_table[4] = {
{STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};
1 change: 0 additions & 1 deletion variants/stm32/CDEBYTE_E77-MBL/variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ Do not expect a working Meshtastic device with this target.
#define LED_PIN PB4 // LED1
// #define LED_PIN PB3 // LED2
#define LED_STATE_ON 1

#endif
2 changes: 1 addition & 1 deletion variants/stm32/rak3172/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ build_flags =
-DMESHTASTIC_EXCLUDE_ENVIRONMENTAL_SENSOR=1
-DMESHTASTIC_EXCLUDE_I2C=1
-DMESHTASTIC_EXCLUDE_GPS=1
;-DCFG_DEBUG

upload_port = stlink
7 changes: 7 additions & 0 deletions variants/stm32/rak3172/rfswitch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// Pins from https://forum.rakwireless.com/t/rak3172-internal-schematic/4557/2
// PB8, PC13

static const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PB8, PC13, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};

static const Module::RfSwitchMode_t rfswitch_table[4] = {
{STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};
8 changes: 8 additions & 0 deletions variants/stm32/wio-e5/rfswitch.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/* https://wiki.seeedstudio.com/LoRa-E5_STM32WLE5JC_Module/
* Wio-E5 module ONLY transmits through RFO_HP
* Receive: PA4=1, PA5=0
* Transmit(high output power, SMPS mode): PA4=0, PA5=1 */
static const RADIOLIB_PIN_TYPE rfswitch_pins[5] = {PA4, PA5, RADIOLIB_NC, RADIOLIB_NC, RADIOLIB_NC};

static const Module::RfSwitchMode_t rfswitch_table[4] = {
{STM32WLx::MODE_IDLE, {LOW, LOW}}, {STM32WLx::MODE_RX, {HIGH, LOW}}, {STM32WLx::MODE_TX_HP, {LOW, HIGH}}, END_OF_MODE_TABLE};
Loading