cancel
Showing results for 
Search instead for 
Did you mean: 

Crystal LSE startup problem on STM32F103RD

o239955_st
Associate II
Posted on September 03, 2015 at 09:23

Hello,

We're using an STM32F103RD for one of our product and on which an extrenal crystal (768Khz) is connected on OSC32 In and ON (LSE). My problem is that this crystal only start to oscillate when the scope probe is touching the OSC32IN pin. The crystal is an ABS25-32768-6T, the load capacitor is 6pf (and tried with 2.2pF too) and the ext resistor is 0 ohm. To configure the F1 clock tree, I use the HAL function (version 1.0.1):

__PWR_CLK_ENABLE();
__BKP_CLK_ENABLE();
RCC_OscInitTypeDef RCC_OscInitStruct;
RCC_ClkInitTypeDef RCC_ClkInitStruct;
RCC_PeriphCLKInitTypeDef PeriphClkInitStruct;
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE | RCC_OSCILLATORTYPE_LSE;
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
RCC_OscInitStruct.HSEPredivValue = RCC_HSE_PREDIV_DIV1;
RCC_OscInitStruct.LSEState = RCC_LSE_ON;
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
RCC_OscInitStruct.PLL.PLLMUL = RCC_PLL_MUL3;
HAL_RCC_OscConfig(&RCC_OscInitStruct);
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK|RCC_CLOCKTYPE_PCLK1 /*|RCC_CLOCKTYPE_PCLK2*/;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV2; // DIV4
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1; //DIV2
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1);
PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE;
HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct);
HAL_SYSTICK_Config(HAL_RCC_GetHCLKFreq()/1000);
HAL_SYSTICK_CLKSourceConfig(SYSTICK_CLKSOURCE_HCLK);

I never get this kind of problem before ! Anyone have an idea to solve my problem. Thanks in advance Olivier
2 REPLIES 2
Nesrine M_O
Lead II
Posted on September 03, 2015 at 12:02

Hi ghislain.olivier,

For STM32F103RD it is recommended to mount an additional parallel feedback resistor (from 16 MΩ to 22 MΩ) on board to help the oscillation start-up in all cases (see  

http://www.st.com/web/en/resource/technical/document/errata_sheet/CD00197763.pdf

  ).

For more details on compatible crystals and hardware techniques on PCB, refer to

http://www.st.com/st-web-ui/static/active/en/resource/technical/document/application_note/CD00221665.pdf?s_searchtype=keyword

  .

-Syrine-

o239955_st
Associate II
Posted on September 07, 2015 at 09:10

Thanks for your answer.

I tried with an parallel resistor but the crystal doesn't start without the scope probe.

But I think the problem is coming from a PCB layout problem. the crystal is a bit far from the stm32 and doesn't have its own ground plane.

Olivier