cancel
Showing results for 
Search instead for 
Did you mean: 

LoRa example for STM32WL | un able to read from UART

STMGuitartune68
Associate II

I am currently working on the LoRaWAN_END_NODE example project for a stm32WL . And I want to receive external data via uart and use the LoRaWan process continually, however I am getting problems. The UART is giving invalid data after the sequencer is being initialized.

Edit: I have tried the suggestions below, I have put the gps into a task for the sequencer to run. I have also disabled low power mode. I still get invalid data from the UART that I don't receive when the sequencer is not on.

Is this a clock issue? Any ideas?

4 REPLIES 4
Issamos
Lead II

Hello @STMGuitartune68 

I suggest you to integrate the UART communication in the LoRaWAN  application. That's because when you are in the while loop, the sequencer in the LoRaWAN app is activated. So, it may cause a problem integrating other APIs in the process.

Best regards.

II

Danish1
Lead II

The LoRa examples are optimised for extremely low power operation.

By default, stm32_seq.c puts the stm32 into deep sleep (with all oscillators apart from LSE stopped) except when there is LoRa activity. And under those circumstances, UARTs can't work.

Have a look for #defines like LOW_POWER_DISABLE . You would need that to be 1

I had tried this, however no luck. The problem arrises when the RTC timers are initialized for lora. the example changes some things for hal get tick and hal inittick. Im having problems with adding to those so that the uart is on a proper clock. Any ideas?

Chris4
Associate

Hi, I have met the same problem. Have you solved the issue so far?  I want to transfer the gps data via usart to lorawan network, but I don't know how to do that. Do you have any advices?