Skip to main content
emil28
Associate III
March 12, 2020
Solved

Lora Configuration: L476, SX1272 and PA-BOOST

  • March 12, 2020
  • 3 replies
  • 1715 views

Hello,

For a project, I am using the code given on the STLRWAN1 web page (https://www.st.com/en/evaluation-tools/i-nucleo-lrwan1.html#tools-software), and the project "End Node". I am using the L476 uC and the SX1272. How can I configure the code in order to make the antenna works on PA BOOST ? The original code makes the antenna works on RFO.

Thanks.

This topic has been closed for replies.
Best answer by Tesla DeLorean

You presumably take your sx1272mb2das.c or equivalent file driving YOUR SX1272 implementation, and modify the SX1272GetPaSelect() routine to pick a different output pin.

uint8_t SX1272GetPaSelect( uint32_t channel )

{

  return RF_PACONFIG_PASELECT_RFO;

}

or

uint8_t SX1276GetPaSelect( uint32_t channel )

{

  if( channel > RF_MID_BAND_THRESH )

  {

    return RF_PACONFIG_PASELECT_PABOOST;

  }

  else

  {

    return RF_PACONFIG_PASELECT_RFO;

  }

}

3 replies

Tesla DeLorean
Tesla DeLoreanBest answer
Guru
March 12, 2020

You presumably take your sx1272mb2das.c or equivalent file driving YOUR SX1272 implementation, and modify the SX1272GetPaSelect() routine to pick a different output pin.

uint8_t SX1272GetPaSelect( uint32_t channel )

{

  return RF_PACONFIG_PASELECT_RFO;

}

or

uint8_t SX1276GetPaSelect( uint32_t channel )

{

  if( channel > RF_MID_BAND_THRESH )

  {

    return RF_PACONFIG_PASELECT_PABOOST;

  }

  else

  {

    return RF_PACONFIG_PASELECT_RFO;

  }

}

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
emil28
emil28Author
Associate III
March 24, 2020

Hello,

Is is useless to open a discussion only for that question, but do you know a way to get the time and date of the LoRa server after the JOIN request ?

Thanks

emil28
emil28Author
Associate III
March 13, 2020

Hello,

Thanks for the quick answer, I really appreciate it.

I changed the function SX1272GetPaSelect like you said, but when I read the register 0x09 (RegPaConfig), the value is still 0x0F, so PaSelect is still configured on RF0.

I tried to write directly the good value (0x8F) in the register 0x09, it works, but after the LoRa.Join() function, the value is reset to 0x0F.

Any idea ?

Thanks.

emil28
emil28Author
Associate III
March 13, 2020

Found the solution, there was a problem in the configuration of my SPI, thanks for your help !! :)