cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WL55JC1 LoRa EndNode example not working when RTC Bin Mode set to "Free running BCD calender and binary mode"

NNyla.1
Associate

Hi,

currently I am working with the NUCLEO-WL55JC1, using the STM32Cube FW_WL V1.3.0 and the LoRaWAN_End_Node example as base.

My target is to keep the LoRa stack working as it is on the example, but also to use the RTC to store the current date and time values, since I have to log the measurements with timestamp on an external memory.

When I try to use the RTC Bin Mode set to "Free running BCD calender and binary mode" or "Free running BCD calender mode", the example simply stop working. The last log I get on screen is : "MAC txDone".

Is that a way to use the internal RTC to save current date and time, and keep the LoRaWAN stack working?

System info:

STM32CubeIDE : 1.11.2 (Windows version)

STM32CubeMX : 6.7.0-RC4

I've found someone with a similar problem, but I was not able to solve my problem with the given answer (Question : BCD Calendar and Binary mode (mix mode) alarm is not working in STM32WL55 by digidhamu)

Many thanks in advance!

2 REPLIES 2
FPicc.1
Senior

Hello, have you solved it? I'm having the same problem, but with the PingPong_SubGHz example.

Roro1990
Associate II

Hi, 

I have the same problem with LoraEndNode example, i changed RTC to Free running BCD and binary mode but when device try to connect to lorawan, it was halt in "MAC txDone".

RTC is configured as follow( i tried with several values for

hrtc.Init.AsynchPrediv and hrtc.Init.SynchPrediv but it is not working)

:

#define RTC_N_PREDIV_S 10

#define RTC_PREDIV_S ((1<<RTC_N_PREDIV_S)-1)

#define RTC_PREDIV_A ((1<<(15-RTC_N_PREDIV_S))-1)

 

hrtc.Instance = RTC;

hrtc.Init.HourFormat = RTC_HOURFORMAT_24;

hrtc.Init.AsynchPrediv = RTC_PREDIV_A;

hrtc.Init.SynchPrediv = RTC_PREDIV_S;

hrtc.Init.OutPut = RTC_OUTPUT_DISABLE;

hrtc.Init.OutPutRemap = RTC_OUTPUT_REMAP_NONE;

hrtc.Init.OutPutPolarity = RTC_OUTPUT_POLARITY_HIGH;

hrtc.Init.OutPutType = RTC_OUTPUT_TYPE_OPENDRAIN;

hrtc.Init.OutPutPullUp = RTC_OUTPUT_PULLUP_NONE;

hrtc.Init.BinMode = RTC_BINARY_MIX;

hrtc.Init.BinMixBcdU = RTC_BINARY_MIX_BCDU_0;