AnsweredAssumed Answered

RTC not work

Question asked by nguyen_phu.thinh.001 on Mar 9, 2012
Latest reply on Mar 13, 2012 by 31696
Hello all,
I connected crystal 32.768 khz to pin C5,C6 of stm8l151.
I want to use RTC-calendar but look like crystal not work.

  /* Enable LSE */
  CLK_LSEConfig(CLK_LSE_ON);
  /* Wait for LSE clock to be ready */
  while (CLK_GetFlagStatus(CLK_FLAG_LSERDY) == RESET);
  /* wait for 1 second for the LSE Stabilisation */
  LSE_StabTime();
  /* Select LSE (32.768 KHz) as RTC clock source */
  CLK_RTCClockConfig(CLK_RTCCLKSource_LSE, CLK_RTCCLKDiv_1);
  CLK_PeripheralClockConfig(CLK_Peripheral_RTC, ENABLE);

Please help me
Thanks all,

Outcomes