AnsweredAssumed Answered

Crystal LSE startup problem on STM32F103RD

Question asked by ghislain.olivier on Sep 3, 2015
Latest reply on Sep 7, 2015 by ghislain.olivier
Hello,

We're using an STM32F103RD for one of our product and on which an extrenal crystal (32.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

Outcomes