Skip to main content
antonioB
Associate III
April 13, 2017
Question

BUG CubeMX 4.20.1 and RTC

  • April 13, 2017
  • 4 replies
  • 1450 views
Posted on April 13, 2017 at 16:19

hi to all, i use a  cubemx 4.20.1 for configure STM32L152RE; when i configure the RTC pin with alarm A  i see a error handler.

indeed when the system arrived to LSE configuration i have a HAL_TIMEOUT,

can you help me?

best regards

A.

#bug #rtc #cubemx #lse-osc32-not-starting-oscillation
This topic has been closed for replies.

4 replies

Technical Moderator
April 17, 2017
Posted on April 17, 2017 at 16:18

Hi,

Could you please share your .ioc file to ckeck your issue?

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
antonioB
antonioBAuthor
Associate III
April 18, 2017
Posted on April 18, 2017 at 09:33

Hi Imen,

in this folder you can download my ioc file

https://www.dropbox.com/sh/if8hee3py9v2u83/AAC7ZWj79C3fTbdpaBut6V5ya?dl=0

 

thx

Antonio

Technical Moderator
April 18, 2017
Posted on April 18, 2017 at 10:36

Hi

Buonanno.Antonio

,

You have this configuration code from CubeMx:

RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI|RCC_OSCILLATORTYPE_HSE

|RCC_OSCILLATORTYPE_LSE;

You should removethe

RCC_OSCILLATORTYPE_HSI o

scillator

that you don't need.

This issue is fixed in the CubeMx version 4.1 and you should first EDIT the .ioc file and REMOVEtheRCC.OscillatorType that you don't need

E.g: remove this line

RCC.OscillatorTypeHSI=RCC_OSCILLATORTYPE_HSI

Then re-generate the project, this will resolve your problem.

Imen

"When your question is answered, please close this topic by clicking ""Accept as Solution"".ThanksImen"
antonioB
antonioBAuthor
Associate III
April 18, 2017
Posted on April 18, 2017 at 15:49

Hi Imen thanks for your answer,

i create a new file ioc, i see that the system crashes when i active LSE in RTC/LCD source MUX, if i use LSI i don't have problem.

Antonio

celalhancer
Associate
August 18, 2017
Posted on August 18, 2017 at 20:47

Hello,

I have same problem with ver. 4.21.0.

If I use LSI with RTC I dont have problem.

But when I select LSE, program stuct at void _Error_Handler.

The problem is at this function.

while((hrtc->Instance->ISR & RTC_ISR_INITF) == (uint32_t)RESET)

 {

   if((HAL_GetTick() - tickstart ) > RTC_TIMEOUT_VALUE)

    {

      return HAL_TIMEOUT;

     }

 }

I changed RTC_TIMEOUT_VALUE 1000 to 9000 but still I have problem.

I use stm32f429i discovery board (I had already soldered 32.762khz xtall) and

my .ioc file at link,

https://www.dropbox.com/s/jethyab2u0nuhih/akv_prjct.ioc?dl=0

 

Best regards

Celal HANCER