cancel
Showing results for 
Search instead for 
Did you mean: 

LoRaWAN Network Join Issue Using Shared UART on RAK3172 Module (STM32WLE5)

PrathamSalunkhe
Associate

Hello ST Community,

I’m currently working on a project using the RAK3172 Evaluation Board that integrates the STM32WLE5 chipset. I successfully tested the default example (LORAWAN_AT_SLAVE), and it works well on the evaluation board. I’m able to communicate using AT commands as expected.

Project Setup:

In my project, I need to:

  1. Read multiple sensor data over UART via RS485.
  2. Send this data to a server using LoRaWAN communication.

Challenges:

The STM32WLE5 in the RAK3172 module has three UART peripherals, but only two can be used simultaneously. Here’s my current setup:

  • UART1: Used to receive sensor data over RS485.
  • UART2: Used for debugging.

This configuration leaves me without a dedicated UART for LoRaWAN communication. Since I can’t use a third UART, I’ve tried sharing UART2 between debugging and LoRaWAN communication.

LoRaWAN Configuration and Issue:

I’ve hardcoded the AT commands in the code itself to configure and join the LoRaWAN network, so they’re not being entered manually. However, after configuring the LoRaWAN module, I’m unable to join the network server:

  • No response is received after sending the join command.
  • The UART status shows a HAL_BUSY error, suggesting an ongoing transmission that doesn’t complete, potentially due to conflicts when switching between debugging and AT command communication on the same UART.

Request for Help:

I’m looking for advice on:

  • Managing UART conflicts when using a single UART for both debugging and LoRaWAN AT commands.
  • Any alternative approaches to maximize UART usage on this module.
  • Solutions to prevent or resolve the HAL_BUSY status when attempting to join the LoRaWAN network.

Any insights would be greatly appreciated!

Thank you for your time and assistance!

1 ACCEPTED SOLUTION

Accepted Solutions

@PrathamSalunkhe wrote:

The STM32WLE5 in the RAK3172 module has three UART peripherals, but only two can be used simultaneously


Could you explain that? Is it a limitation of available pins?

 


@PrathamSalunkhe wrote:
  • UART2: Used for debugging.

I presume you mean printf-style debug?

Rather than use up a hardware UART just for printf, maybe:

  • Redirect over the SWD interface?
  • Use a "soft" UART?
  • Use some other interface for debug?

View solution in original post

1 REPLY 1

@PrathamSalunkhe wrote:

The STM32WLE5 in the RAK3172 module has three UART peripherals, but only two can be used simultaneously


Could you explain that? Is it a limitation of available pins?

 


@PrathamSalunkhe wrote:
  • UART2: Used for debugging.

I presume you mean printf-style debug?

Rather than use up a hardware UART just for printf, maybe:

  • Redirect over the SWD interface?
  • Use a "soft" UART?
  • Use some other interface for debug?