cancel
Showing results for 
Search instead for 
Did you mean: 

On STM32 cube I-CUBE-LRWAN, GPIOS sx1276

MWisi.1
Associate II

#define RADIO_TCXO_VCC_CLK_ENABLE()   __HAL_RCC_GPIOA_CLK_ENABLE()

#define RADIO_ANT_SWITCH_CLK_ENABLE_RX()   __HAL_RCC_GPIOA_CLK_ENABLE()

#define RADIO_ANT_SWITCH_CLK_ENABLE_TX_BOOST()   __HAL_RCC_GPIOC_CLK_ENABLE()

#define RADIO_ANT_SWITCH_CLK_ENABLE_TX_RFO()   __HAL_RCC_GPIOC_CLK_ENABLE()

FIRST: TXCO ENABLE/DISABLE, RIGHT ?

SECOND: TRANSMIT/RECEIVE ANTENNA DIRECTION

THIRD: ?

FOURTH: ?

Thank you!

7 REPLIES 7
Bruno_ST
ST Employee

hello @MWisi.1​ ,

FIRST: TXCO ENABLE/DISABLE => Yes

SECOND: TRANSMIT/RECEIVE ANTENNA DIRECTION => RECEIVE ANTENNA DIRECTION

THIRD: TX BOOST => LP mode up to +15dBm and HP mode up to +22dBm

FOURTH: TX : => TRANSMIT ANTENNA DIRECTION

BR,

Bruno

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

MWisi.1
Associate II

Hi @Bruno_ST​ 

SECOND: TRANSMIT/RECEIVE ANTENNA DIRECTION => RECEIVE ANTENNA DIRECTION

FOURTH: TX : => TRANSMIT ANTENNA DIRECTION

wow, looks that uses two GPIOS, one to enable receive (HIGH), and one to enable transmit (HIGH)

My module use only one GPIO to enable transmit (HIGH) and enable receive (LOW).

Maybe i will have to modify the STM32 CUBE LRWAN code, right ?

Because my examples in

My LoRaWAN Semtech project (KEIL) and my LoRaWAN LMIC project (Arduino), uses the

#define RADIO_ANT_SWITCH_HF         PA_15 (keil)

 .rxtx = RADIO_ANT_SWITCH_HF, (lmic)

Use 1 GPIO to control the direction.

And i right ?

Tks

ssipa.1
Associate II

second: in order not to get in troubles:

There is some error that occurs because of the length of pathnames -on windows- you can copy and paste the project to shorten the path name and then I was able to program the module to use it as AT command slave.

Good ! So problem solved ?

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

MWisi.1
Associate II

Hi @ssipa.1​  and @Bruno_ST​ 

no, i have to modify the STM32 CUBE LRWAN because use TWO GPIOS to control the direction, transmit and receive data, am i right ?

I have to modify it to make this direction control, using only on GPIO, right ?

If confirm, i can continue! Thanks

Miguel

Bruno_ST
ST Employee

@MWisi.1​ 

I don't know the module you are using but with I-CUBE-LRWAN and setup SX1276MB1MAS, yes there is only one pin to control TX/RX:

File sx1276mb1mas.c:

void SX1276MB1MAS_RADIO_SetAntSw(RfSw_TypeDef state)

{

  switch (state)

  {

    case RFSW_OFF:

    {

      HAL_GPIO_WritePin(RADIO_ANT_SWITCH_PORT, RADIO_ANT_SWITCH_PIN, GPIO_PIN_RESET);

      break;

    }

    case RFSW_RX:

    {

      HAL_GPIO_WritePin(RADIO_ANT_SWITCH_PORT, RADIO_ANT_SWITCH_PIN, GPIO_PIN_RESET);

      break;

    }

    case RFSW_RFO_LP:

    {

      HAL_GPIO_WritePin(RADIO_ANT_SWITCH_PORT, RADIO_ANT_SWITCH_PIN, GPIO_PIN_SET);

      break;

  etc...

RFSW_RFO_LP is RFOutput so TX.

BR,

Bruno

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Expect that you'll need to review and modify the software stack to address the specifics of your implementation, and how the RF signals are gated via the RF switch/mux in-front of the antenna, and how many "ways" that can go, the number of pins involved, and the HIGH/LOW states with respect to the mode/mixing you want to occur. Perhaps start by looking at the Data Sheet for the RF part first, and how it's wired in your implementation.

Think of this from a HW perspective, not a SW Engineering one.

The Murata module implementation has THREE paths, Receive, Output Highest Power, Output Normal Power, other designs/implementations have a Receive OR Transmit, but the MUX can gate both channels on together, which you don't want

no, i have to modify the STM32 CUBE LRWAN because use TWO GPIOS to control the direction, transmit and receive data, am i right ?

 I have to modify it to make this direction control, using only on GPIO, right ?

No, probably not right, look at the schematics/block diagrams. Pretty sure there's THREE on the B-L072Z-LRWAN1 (DISCO), but you're being super vague about YOUR design.

Which board are you using? Something of your own creation? The Semtech Shields?

If YOUR design has one or two pins you'll need to walk the software and do a clean port for your implementation that fully takes into account the modes of operation, and transitions, and timing/sequencing properly. Not simply an affirmation by third-parties that it's "right" or completely handled.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..