Skip to main content
Graduate
December 21, 2022
Question

STM32H750 RTC wakeup timer not periodically triggered

  • December 21, 2022
  • 2 replies
  • 1741 views

Hi,

I am using RTC with LSE (32.768Khz) in my product, and I programed RTC wakeup timer to 5min by calling

HAL_RTCEx_SetWakeUpTimer_IT(&hrtc, 300, RTC_WAKEUPCLOCK_CK_SPRE_16BITS);

It works perfectly on my test machine, but it will not trigger on my customer side with identical firmware.

I have checked the return value from HAL_RTCEx_GetWakeUpTimer() is 300 for sure.

Is there any reason make RTC stop counting this timer or stop this feature?

Thanks,

-Engin

    This topic has been closed for replies.

    2 replies

    ST Employee
    December 22, 2022

    Hi @Engin Lee​,

    is the LSE working well ? I'd try to use the MCO1 output to check if the LSE is clocking correctly. There may be a problem with the oscillator or it's connection, even possibly some EMC problem.

    BR,

    J

    Engin LeeAuthor
    Graduate
    December 23, 2022

    Hi @JHOUD​ ,

    I appreciate for your suggestion, and I am guessing it's an issue from oscillator too.

    But I can't confirm it until receiving failure machine from customer side.

    At meanwhile, I will study AN4736 in order to detect LSE is working or not by using TIM16 remap mode and counting pulses during 1 second.

    Maybe it's a good choice to switch RTC clock source to LSI (32kHz) when LSE is abnormal?

    Thanks,

    -Engin

    ST Employee
    December 23, 2022

    Hi @Engin Lee​,

    if you are in position to send a new FW to the customer, try increasing the LSE oscillator driving capability in RCC_BDCR->LSEDRV. Default is low, to conserve power and most of the time sufficient. In noisy environments or with less than ideal crystal, the driving capability increase often helps. In the same register you can also configure CSS on LSE, please read chapter 8.5.3 of the RM0433 carefully, it's not just matter of setting a register flag and forgetting.

    Good luck!

    J

    Graduate II
    December 30, 2022