AnsweredAssumed Answered

Bug Report STM32L1xx Firmware, LSI Timing

Question asked by Clive One on Jan 15, 2014
STM32L1xx_StdPeriph_Lib_V1.2.0\Project\STM32L1xx_StdPeriph_Examples\RTC\RTC_LSI\main.c

GetLSIFrequency() makes a reference to CC4 (from the F2/F4 implementation using TIM5), and uses PCLK1 values to compute timing from TIM10 which is on APB2 (PCLK2)

STM32L1xx_StdPeriph_Lib_V1.2.0\Project\STM32L1xx_StdPeriph_Examples\RTC\RTC_LSI\stm32l1xx_it.c

/* Capture computation */
if (IC1ReadValue2 > IC1ReadValue1)
{
  PeriodValue = (IC1ReadValue2 - IC1ReadValue1);
}
else
{
  PeriodValue = ((0xFFFF - IC1ReadValue1) + IC1ReadValue2); // Someone needs to test their 16-bit wrapping model
}

Outcomes