STM32CubeF3 icon indicating copy to clipboard operation
STM32CubeF3 copied to clipboard

missing static in stm32f3xx_hal_rcc.c

Open CanastraRF opened this issue 3 years ago • 2 comments

Hi In stm32f3xx_hal_rcc.c are two const array

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[16U] = { 1U, 2U,  3U,  4U,  5U,  6U,  7U,  8U,
                                         9U,10U, 11U, 12U, 13U, 14U, 15U, 16U};

They are not declared in stm32f3xx_hal_rcc.h. So they should be static.

Same in stm32f3xx_hal_rcc_ex.c

#if defined(RCC_CFGR2_ADC1PRES) || defined(RCC_CFGR2_ADCPRE12) || defined(RCC_CFGR2_ADCPRE34)
  uint16_t adc_pll_prediv_table[16U] = { 1U,  2U,  4U,  6U, 8U, 10U, 12U, 16U, 32U, 64U, 128U, 256U, 256U, 256U, 256U, 256U};
#endif /* RCC_CFGR2_ADC1PRES || RCC_CFGR2_ADCPRE12 || RCC_CFGR2_ADCPRE34 */
#if defined(RCC_CFGR_SDPRE)
  uint8_t sdadc_prescaler_table[16U] = { 2U,  4U,  6U, 8U, 10U, 12U, 14U, 16U, 20U, 24U, 28U, 32U, 36U, 40U, 44U, 48U};
#endif /* RCC_CFGR_SDPRE */

Same in stm32f3xx_ll_rcc.c

#if defined(RCC_CFGR2_ADC1PRES) || defined(RCC_CFGR2_ADCPRE12) || defined(RCC_CFGR2_ADCPRE34)
uint16_t const aADCPrescTable[16U]       = {1U, 2U, 4U, 6U, 8U, 10U, 12U, 16U, 32U, 64U, 128U, 256U, 256U, 256U, 256U, 256U};
#endif /* RCC_CFGR2_ADC1PRES || RCC_CFGR2_ADCPRE12 || RCC_CFGR2_ADCPRE34 */
#if defined(RCC_CFGR_SDPRE)
uint8_t const aSDADCPrescTable[16U]       = {2U, 4U, 6U, 8U, 10U, 12U, 14U, 16U, 20U, 24U, 28U, 32U, 36U, 40U, 44U, 48U};
#endif /* RCC_CFGR_SDPRE */

Please fix this

CanastraRF avatar Jan 03 '22 13:01 CanastraRF

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,

RKOUSTM avatar Jan 07 '22 14:01 RKOUSTM

ST Internal Reference: 120490

RKOUSTM avatar Jan 07 '22 14:01 RKOUSTM

Hello @CanastraRF,

The issue you reported has been fixed in the frame of version v1.11.4 of the STM32CubeF3 published on GitHub.

Thank you again for having reported.

With regards,

TOUNSTM avatar Mar 07 '23 17:03 TOUNSTM