cancel
Showing results for 
Search instead for 
Did you mean: 

start RTC in STM32L4 with Low Level (LL) Driver

l90mehdi
Associate II
Posted on February 15, 2017 at 15:02

how can i run RTC with LL driver with cubeMX in STM32L4???

6 REPLIES 6
Amel NASRI
ST Employee
Posted on February 15, 2017 at 17:24

Hi

khastar.mehdi

‌,

If you need to generate initialization code for RTC based on LL driver, you have just to select ''LL'' for the RTC configuration generated code (Project >> Settings >> Advanced Setting):

0690X00000606JwQAI.png

Then, depending on RTC use case, you may add the control functions.

I suggest you have a look to the LL-based examples available in the STM32CubeL4 package underSTM32Cube_FW_L4_V1.6.0\Projects\STM32L476RG-Nucleo\Examples_LL\RTC.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on February 15, 2017 at 21:37

Hi 

dear Amel N

yes I've seen examples and cube settings.

but i can not run RTC with code that cube built . 

RTC registers are initialize correct(i see by debugger )

but RTC counters(Hour,minute,second,year,.....)  are fix.

so now I want to use codes(cube code)

but I do not know how to do this!!!!!!!!!!!

thank you.

Jeanne Joly
Senior III
Posted on February 28, 2017 at 14:35

Hello

khastar.mehdi

,

Which IAR release are you using?

In fact, I see that many new L4 are supported in IAR 7.80 (and not with IAR 7.70, see the new MCUs supported by IAR

http://supp.iar.com/FilesPublic/UPDINFO/011453/arm/doc/infocenter/device_support/STMicroelectronics.ENU.html#STM32L431

). So maybe, your issue comes from the IAR release you use.

I am downloading the new IAR release and will see if it compiles better. I will keep you informed.

BR. Eric

Posted on March 05, 2017 at 10:37

Hello Eric Dampierre

I am working with KEIL .

Thank you.

Jeanne Joly
Senior III
Posted on March 06, 2017 at 09:22

Hello again,

I tested with the version of Keil I have :

0690X00000606TwQAI.png

and I use the STM32L431RCTx MCU with RTC set to LL. 

And it compiles correctly in Keil : 

*** Using Compiler 'V5.06 update 4 (build 422)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'

Build target 'test_L431RCTx_Keil'

compiling system_stm32l4xx.c...

compiling stm32l4xx_hal_cortex.c...

compiling stm32l4xx_hal_flash_ramfunc.c...

compiling stm32l4xx_ll_utils.c...

compiling stm32l4xx_hal_rcc_ex.c...

compiling stm32l4xx_hal_pwr_ex.c...

compiling stm32l4xx_hal_dma.c...

compiling stm32l4xx_ll_dma.c...

compiling stm32l4xx_hal_i2c.c...

compiling stm32l4xx_ll_exti.c...

compiling stm32l4xx_hal.c...

compiling stm32l4xx_hal_rcc.c...

compiling stm32l4xx_ll_rtc.c...

compiling stm32l4xx_hal_pwr.c...

compiling stm32l4xx_hal_gpio.c...

compiling stm32l4xx_hal_i2c_ex.c...

compiling stm32l4xx_hal_flash.c...

compiling stm32l4xx_hal_flash_ex.c...

compiling stm32l4xx_it.c...

compiling stm32l4xx_ll_gpio.c...

compiling stm32l4xx_hal_msp.c...

assembling startup_stm32l431xx.s...

compiling main.c...

linking...

Program Size: Code=4148 RO-data=492 RW-data=8 ZI-data=1024

''test_L431RCTx_Keil\test_L431RCTx_Keil.axf'' - 0 Error(s), 0 Warning(s).

Build Time Elapsed: 00:01:06

It would be easier to help you if you give us all the input you have when you encounter your issue.

If your issue still occurs after verifying that Keil supports the MCU you are working on, please provide us your ioc, keil version, CubeMX version...

BR. Eric

Posted on March 06, 2017 at 09:02

Hello

khastar.mehdi

,

Which version of Keil are you using?

Are you sure this release of Keil supports the STM32L4 you work on?

BR. Eric