Comments (5)
why to manage the RF Switch control pin with a GPIO pin and not with the SX127x RXTX dedicated pin?
from loramac-node.
SX1276SetAntSw(0); // SX1276.RxTx is still 0, this function is not worked as expected
to set to tx, you must pass non-zero as argument. you are setting to rx from rx i think.
On April 19, 2016 10:51:16 AM GMT+03:00, Jiapeng Li [email protected] wrote:
SX1276.RxTx variable is not synced when the device is set to low power
mode.
This may cause RxWindow2 receive sesitivity lost issue of LoRaWAN
stack.// Reproduce the issue
SX1276SetAntSwLowPower(false);
SX1276SetAntSw(0); // SX1276.RxTx is 0 now
SX1276SetAntSwLowPower(false);
SX1276SetAntSw(0); // SX1276.RxTx is still 0, this function is not
worked as expectedThe related functions locate at sx127x-board.c files.
void SX1276SetAntSwLowPower( bool status ) { if( RadioIsActive != status ) { RadioIsActive = status; if( status == false ) { SX1276AntSwInit( ); } else { SX1276AntSwDeInit( ); } } } void SX1276AntSwInit( void ) { GpioInit( &AntSwitchLf, RADIO_ANT_SWITCH_LF, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 1 ); GpioInit( &AntSwitchHf, RADIO_ANT_SWITCH_HF, PIN_OUTPUT, PIN_PUSH_PULL, PIN_PULL_UP, 0 ); } void SX1276AntSwDeInit( void ) { GpioInit( &AntSwitchLf, RADIO_ANT_SWITCH_LF, PIN_OUTPUT, PIN_OPEN_DRAIN, PIN_NO_PULL, 0 ); GpioInit( &AntSwitchHf, RADIO_ANT_SWITCH_HF, PIN_OUTPUT, PIN_OPEN_DRAIN, PIN_NO_PULL, 0 ); } void SX1276SetAntSw( uint8_t rxTx ) { if( SX1276.RxTx == rxTx ) { return; } SX1276.RxTx = rxTx; if( rxTx != 0 ) // 1: TX, 0: RX { GpioWrite( &AntSwitchLf, 0 ); GpioWrite( &AntSwitchHf, 1 ); } else { GpioWrite( &AntSwitchLf, 1 ); GpioWrite( &AntSwitchHf, 0 ); } }
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
#68
from loramac-node.
@nestorayuso It is is for flexibility reasons. Depending on the antenna switch used the polarity may be inverted (requires additional external inverter), some may need to have 2 control pins. Globally it is PCB design dependent.
If your board design directly connects the Radio RxTx pin to the antenna switch then you could remove the contents of these functions.
The board files in this project are meant to be adapted to the specific board design.
from loramac-node.
I am having the SX1272 chip which have TX_switch and Rx_switch (https://www.rfsolutions.co.uk/radio-modules-c10/frequency-c57/fm-lora-transceiver-module-pre-set-to-868mhz-p4682).
but in code implementation they used single RXTX pin to control antenna operation(transmission or reception). based upon RXTX pin they control antenna operation
How can i modified this related to my situation (i am having the separate pins RX_Switch & TX_Switch).
How can I connect those pins to GPIO of micro controller(MCU)
Could you please help me to solve this problem
Thanks in Advance.
Regards
SAI
from loramac-node.
please don't post the same questions in several places.
First you must create a folder inside boards with the name of your board.
The LoRaMote board is quite similar to your board, use it as a template: copy LoRaMote files to your new folder.
Looking at here: https://github.com/Lora-net/LoRaMac-node/blob/master/src/boards/LoRaMote/sx1272-board.c#L195 you can see it already uses two gpio pins to manage external RF switch, I think you need to modify nothing here.
Modify board.h https://github.com/Lora-net/LoRaMac-node/blob/master/src/boards/LoRaMote/board.h#L103 with your particular gpio pin asignations.
from loramac-node.
Related Issues (20)
- How to get the frequency on OnRxData
- TX Timeout hardcoded HOT 1
- DL not received in Class C AS923-1 + Freq 923.600
- Pre-certification should always failed due to duty-cycle limitation HOT 2
- Stack writes to NVM while radio is transmitting
- TimerInit called multiple times on the same TimerEvent_t struct HOT 1
- Race condition in RtcGetCalendarValue on NucleoL476 board
- LORAMAC_TX_CONFIG tested, but never set.
- GpioMcuRemoveInterrupt sets GPIO pull-up/pull-down registers to random uninitialized memory
- Secure-Element Preprocessor definition ifndef wrapping HOT 1
- AES function rename due to multiple definitions linking error
- LmHandlerInit causing some current leakage till the first tx HOT 2
- The correct value of MinRxSymbols? HOT 1
- does any body port this project for stm32f103?
- Does the Firmware Management (Port 203) is supported by LoRaMac-Node ? HOT 2
- Errata 2.3 current implementation may impact TX configuration
- MacBook M1 chip complies fail! arm-none-eabi-gcc: error: unrecognized command-line option '-arch'; did you mean '-march='?
- Support for MSPM0 Microcontroller
- stm32系列的Unique Devices IDs register错误
- Radio.Sleep() may leave antenna switch powered HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loramac-node.