STM32CubeF1
STM32CubeF1 copied to clipboard
missing static in HAL_RCC_GetSysClockFreq()
Hi In the function
uint32_t HAL_RCC_GetSysClockFreq(void)
are five const array
#if defined(RCC_CFGR2_PREDIV1SRC)
uint8_t const aPLLMULFactorTable[14U] = {0U, 0U, 4U, 5U, 6U, 7U, 8U, 9U, 0U, 0U, 0U, 0U, 0U, 13U};
uint8_t const aPredivFactorTable[16U] = {1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U};
#else
uint8_t const aPLLMULFactorTable[16U] = {2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U, 16U};
#if defined(RCC_CFGR2_PREDIV1)
uint8_t const aPredivFactorTable[16U] = {1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U};
#else
uint8_t const aPredivFactorTable[2U] = {1U, 2U};
#endif /*RCC_CFGR2_PREDIV1*/
they should bee static
same in
uint32_t HAL_RCCEx_GetPeriphCLKFreq(uint32_t PeriphClk)
{
#if defined(STM32F105xC) || defined(STM32F107xC)
uint8_t const aPLLMULFactorTable[14U] = {0U, 0U, 4U, 5U, 6U, 7U, 8U, 9U, 0U, 0U, 0U, 0U, 0U, 13U};
uint8_t const aPredivFactorTable[16U] = {1U, 2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U};
uint32_t prediv1 = 0U, pllclk = 0U, pllmul = 0U;
uint32_t pll2mul = 0U, pll3mul = 0U, prediv2 = 0U;
#endif /* STM32F105xC || STM32F107xC */
#if defined(STM32F102x6) || defined(STM32F102xB) || defined(STM32F103x6) || \
defined(STM32F103xB) || defined(STM32F103xE) || defined(STM32F103xG)
uint8_t const aPLLMULFactorTable[16U] = {2U, 3U, 4U, 5U, 6U, 7U, 8U, 9U, 10U, 11U, 12U, 13U, 14U, 15U, 16U, 16U};
uint8_t const aPredivFactorTable[2U] = {1U, 2U};
uint32_t prediv1 = 0U, pllclk = 0U, pllmul = 0U;
#endif /* STM32F102x6 || STM32F102xB || STM32F103x6 || STM32F103xB || STM32F103xE || STM32F103xG */
Please fix this
Hi @CanastraRF,
Thank you for your report. An internal tracker has been logged and a fix will be implemented and made available in the frame of a future release.
Thank you again for you report.
With regards,
ST Internal Reference: 120495
Hello @CanastraRF
Thank you again for having reported this point. It has been fixed in the frame of version 1.8.5 of this firmware.
With regards,