Skip to main content
Visitor II
April 30, 2022
Solved

New batch STM32F051 LSE don't start

  • April 30, 2022
  • 19 replies
  • 7612 views

A new batch of electronic board mount an STM32F05R8T6

AA170 9U

TWN AA 131 marked.

All of this devices don't start up LSE clock.

The code is the same for about five years and makes the LSE clock start up till this days correctly. The initialization was made using example code bundled with discovery stm32F051.

I create with CubeIDE Version: 1.9.0 a minimal setup (CubeMX) for initializa internal RC but the code hangs on

while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)
 {
 if((HAL_GetTick() - tickstart ) > RCC_LSE_TIMEOUT_VALUE)
 {
 return HAL_TIMEOUT;
 }
 }

The quartz is the same sice five years and i try to modify the capacitor from 15nF to 6,8nF with no success.

Same board with STM32F05R8T6

GQ272 9U

CHN GQ 944 marked

run perfectly.

Any ideas?

Thanks 

Fabio

    This topic has been closed for replies.
    Best answer by passafabio2

    The problem seem the poor cleaning made by manufacturer when they find a Sn join between the 32Khz768 quartz pins. Fixing the unwanted join with soldering wire they don't clean well the water based flux and in some occasions made a lower impededence which makes quartz unable to run. The quartz with soldered join is covered with a 16X2 lcd display then detected dirty pin wasn't immediate.
    The first batch of stm32f051RBT8 was more strong in oscillating.

    Fabio

    19 replies

    Super User
    April 30, 2022

    If you increase RCC_LSE_TIMEOUT_VALUE, does it work?

    If you scope LSE, do you see a signal?

    Visitor II
    April 30, 2022

    Doubled the value from 5000 to 10000 but nothing change...

    A good board programmed with the test code for LSE created with CubeMx corectly goes over the init and chek functionality of LSE, light on a led done by a successive code..

    Super User
    May 1, 2022

    > 15nF to 6,8nF

    Double-check the capacitors, they surely must not be in the nF range.

    Also, how exactly is VBAT connected?

    Write a simple test program, which does nothing but

    • enables backup domain access by setting PWR_CR.DBP (note that PWR clock has to be set in RCC prior to this)
    • resets backup domain using RCC_BDCR.BDRST
    • enables LSE by setting RCC_BDCR.LSEON
    • waits undefinitely until RCC_BDCR.LSERDY is set
    • lights up a LED or indicates success in some other suitable way

    Note, that LSE startup times in several seconds (say up to 10s) is completely normal.

    In this program, try also different RCC_BDCR.LSEDRV settings.

    JW

    Visitor II
    May 1, 2022

    Sorry my mistake, I wanted to say 15pF to 6,8pF

    Graduate II
    May 1, 2022

    STM32F05R8T6 ?? or STM32F051R8T6 STM32F058R8T6

    Can you read the device ID from the part, to be sure of the die/stepping ?

    DBGMCU->IDCODE

    Might need lower capacitance.

    There should be a means to measure/export the LSE clock without probing directly.

    Visitor II
    May 2, 2022

    STM32F051R8T6

    AA170 9U

    TWN AA 131

    IDCODE 0x20006440

    while(__HAL_RCC_GET_FLAG(RCC_FLAG_LSERDY) == RESET)

    Is the flag which manage the running/halt state ol LSE clock.

    Graduate II
    May 2, 2022

    I mean with an oscilloscope or TIM peripheral vs HSE clock​

    Visitor II
    May 3, 2022

    Today I tried using 3,9pF cap (the only I have in my warehouse) with no success....

    Super User
    May 3, 2022

    Have you tried any of what I wrote above, e.g. playing with LSEDRV?

    JW

    Visitor II
    May 3, 2022

    Yes changing LSEDRV nothing happen.

    And untill this batch of micro we made about one thousand of board with LSE Ok...

    Super User
    May 3, 2022
    Try replacing the STM32 chip on a new board with one from an old board.
    Super User
    May 4, 2022

    At this point you may want to contact ST directly, through FAE or the web contact form.

    JW

    Technical Moderator
    May 4, 2022

    Hi @passafabio2​ ,

    As suggested by @Community member​ , I'm checking internally if there is any noted change regarding LSE as I'm not aware of any update.

    In such case, a failure analysis request (FAR) will be required and needs to be initiated by your FAE.

    -Amel

    Graduate II
    May 4, 2022

    Hi @Amel NASRI​ 

    I'd assume there's a new RM0091 somewhere covering the new ICs, the one publicly available is over 5 years old, and clearly not up to date.

    Even if it is a new/duplicate mask-set for a new fab.

    "9U" is the TSMC USA Fab 11

    "98" is the TSMC Taiwan Fab 8

    And in 2019 some was moved to "9C" TSMC Singapore pursuant to PCN MDG/19/10803

    Visitor II
    May 4, 2022

    Yes nothing change.