mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-06 03:29:17 +00:00
Add RF switch settings for STM32WL variants
This commit is contained in:
parent
ca79760372
commit
0b361e25f5
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "SX126xInterface.h"
|
||||
#include "rfswitch.h"
|
||||
|
||||
#ifdef ARCH_STM32WL
|
||||
|
||||
@ -16,13 +17,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
|
@ -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
variants/stm32/CDEBYTE_E77-MBL/rfswitch.h
Normal file
9
variants/stm32/CDEBYTE_E77-MBL/rfswitch.h
Normal file
@ -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};
|
@ -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
|
||||
|
@ -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
variants/stm32/rak3172/rfswitch.h
Normal file
7
variants/stm32/rak3172/rfswitch.h
Normal file
@ -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
variants/stm32/wio-e5/rfswitch.h
Normal file
8
variants/stm32/wio-e5/rfswitch.h
Normal file
@ -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…
Reference in New Issue
Block a user