2012-03-08 07:26 PM
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,2012-03-13 05:21 AM
Hello,
May be your crystal is not oscillating. Pls refer AN2867 at You can also check whether the signals are coming on both the csystal legs at 180 degrees phase shift. I hope this wil help. Regards,