Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generic Node Support #8

Closed
HelgeSeidel opened this issue Jan 4, 2023 · 5 comments
Closed

Generic Node Support #8

HelgeSeidel opened this issue Jan 4, 2023 · 5 comments
Labels
enhancement New feature or request
Milestone

Comments

@HelgeSeidel
Copy link

I’m extremely happy about the release of the STM32LoRaWAN library. By default the STM32LoRaWAN library supports the STM32 Nucleo board with STM32WL55JC MCU.

I would appreciate if the STM32LoRaWAN library could support the Generic Node (https://www.genericnode.com/, https://github.com/TheThingsIndustries/generic-node-se) as well.

The pinout differences are:
RF_CTRL1 NUCLEO - PC4 —> Generic Node - PA0
RF_CTRL2 NUCLEO - PC5 —> Generic Node - PA1
RF_CTRL3 NUCLEO - PC3 —> Generic Node - PB8

Would be great if you could add the Generic Node support.

@fpistm
Copy link
Member

fpistm commented Jan 5, 2023

Hi @HelgeSeidel
Yes it should be fine.
I know some tests have already been done by @sabas1080
TheThingsIndustries/generic-node-se#206 (comment)

It is a community library, do not hesitate to contribute.
I do not have this board so hard to test.

@fpistm fpistm added the enhancement New feature or request label Jan 5, 2023
@fpistm fpistm added this to the 0.1.1/0.2.0 milestone Jan 5, 2023
@Lizethgm
Copy link

Lizethgm commented Jan 6, 2023

Hi,
That's right, we were testing with the Generic Node and it worked by placing directly the generic node chip which is the variant "WL55CCUx". If we select directly the variant "Generic Node SE (TTI)" board it does not work, it marks error when starting the rtc.
Error: .......\Arduino\libraries\STM32LoRaWAN-main\src\BSP\rtc.c

The error mentioned is:

if (HAL_RTC_Init(&hrtc) != HAL_OK)
  {
    Error_Handler();
  }

What was changed was:
In STM32LoRaWAN-main\src\BSP\radio_board_if.c

#if defined(ARDUINO_GENERIC_NODE_SE_TTI) || defined(ARDUINO_GENERIC_WL55CCUX)
  #define LORAWAN_RFSWITCH_PINS PB8,PA0,PA1
  #define LORAWAN_RFSWITCH_PIN_COUNT 3
  #define LORAWAN_RFSWITCH_OFF_VALUES LOW,LOW,LOW
  #define LORAWAN_RFSWITCH_RX_VALUES HIGH,HIGH,LOW
  #define LORAWAN_RFSWITCH_RFO_LP_VALUES HIGH,HIGH,HIGH
  #define LORAWAN_RFSWITCH_RFO_HP_VALUES HIGH,LOW,HIGH

fpistm added a commit to stm32duino/Arduino_Core_STM32 that referenced this issue Mar 23, 2023
used by STM32LoRaWan library

stm32duino/STM32LoRaWAN#8

Signed-off-by: Frederic Pillon <[email protected]>
@fpistm
Copy link
Member

fpistm commented Mar 23, 2023

Hi @Lizethgm and @HelgeSeidel
I've added the RFSWITCH pins definitions to the Generic node SE variant:
stm32duino/Arduino_Core_STM32@5a3f412

@fpistm
Copy link
Member

fpistm commented Mar 23, 2023

I've been able to test and no RTC init error.
STM32 core version 2.5.0 will be released in the coming days including the RF SWITCH definition.
So I close this issue has thanks the core update the library is compatible with GNSE.

@fpistm fpistm closed this as completed Mar 23, 2023
@fpistm
Copy link
Member

fpistm commented Apr 11, 2023

I've been able to test and no RTC init error. STM32 core version 2.5.0 will be released in the coming days including the RF SWITCH definition. So I close this issue has thanks the core update the library is compatible with GNSE.

Hi @HelgeSeidel
I've made some new test and get the rtc init error. After some investigation I found it is due to clock config issue, LSE was not initialized that's why we got this error. I've made a fix to the core: stm32duino/Arduino_Core_STM32#1999

Last time I've tested, I've made RTC tests before and the LSE was probably initialized when switch to LoRaWAN test. 😖

@fpistm fpistm mentioned this issue Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants