cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Report STM32L1xx Firmware, LSI Timing

Posted on January 15, 2014 at 22:25

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
}

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
0 REPLIES 0