cancel
Showing results for 
Search instead for 
Did you mean: 

Bug report - WLE - RTC - Dev Conf Tool Code generation

Felipe Y
Associate

Hi all!

I'm having some issues in order to use the AlarmA and AlarmB features of RTC in the STM32WLE5x MCU. I'm using the HAL library functions.

I've experienced an ambiguous behavior when debugging the code generated in CubeMX module in STM32CubeIDE. First, without using the masks for subsecond registers in the .ioc file, it runs once, at first debug. Then, by clicking on debug once again, it does not return from  MX_RTC_Init() function after startup. I noticed that the code kept in loop on stm32wlxx_hal_rtc.c file (not handled by any error loop).

A second point is that the value that I input in the "free running 32 bit value" fields on RTC Alarms A and B parameters are always transcribed in hexa inside the RTC init function. It means, if I write for example 0xFF in the GUI field, it appears as 0x0xff in the main.c file updated. If I select "decimal" value and input a value of 255, it will write 0x255 in the function.

A third issue that I found, is that when I do use any mask for the subsecond register, I get an error of a non declared definition. it seems that the header file from HAL Library does not define the line below:

 sAlarm.AlarmSubSecondMask = RTC_ALARMSUBSECONDMASK_SS31_8;

So it then causes an error in the code just by generating the initialization functions without any user code implemented.

I tried also to look for a RTC alarm implementation for WLEx family in the standard peripheral libraries and also in the AN3371, but the examples I've found does not match to this MCU. Is there any suggestion?

In addition, there's a very similar question in the topics by an user having issues when waking-up from LP modes using RTC and a WLE MCU. Maybe this report may also apply to him.

1 ACCEPTED SOLUTION

Accepted Solutions
Felipe Y
Associate

Hello, Louis!

Thanks for your reply.

We managed to build our own example based on the free running binary mode, using the subsecond time base. Everything worked fine.

Thanks again and regards,

Felipe Yoshino

View solution in original post

2 REPLIES 2
Louis AUDOLY
ST Employee

Hello @Felipe Y​ thank you for your post and welcome to the community,

I take the point of all your comments, thank you.

I don't know which application you are running but have you try the RTC example from STM32Cube_FW_WL_V1.2.0 , under "Projects\NUCLEO-WL55JC\Examples\RTC\RTC_Alarm" for example ?

Best Regards

Louis

Felipe Y
Associate

Hello, Louis!

Thanks for your reply.

We managed to build our own example based on the free running binary mode, using the subsecond time base. Everything worked fine.

Thanks again and regards,

Felipe Yoshino