AnsweredAssumed Answered

Need help understanding error

Question asked by brand.christiaan on Sep 2, 2015
Latest reply on Mar 25, 2016 by

I am using the STM32F303RE and SdPeriph library v1.2.3. Whenever I build my code I get this error:

STM32F30x_StdPeriph_Driver\src\stm32f30x_rcc.c(994): error:  #268: declaration may not appear after executable statement in block
uint32_t apb1presc = 0;

The rcc.c section is as follows:

#ifdef STM32F303xE  
  uint32_t apb1presc = 0;   ----This is line 994----
  apb1presc = APBAHBPrescTable[tmp];
  /* TIM2CLK clock frequency */
  if(((RCC->CFGR3 & RCC_CFGR3_TIM2SW) == RCC_CFGR3_TIM2SW)&& (RCC_Clocks->SYSCLK_Frequency == pllclk) \  && (apb1presc == ahbpresc))

Is this a bug in the library? I have made no modifications to the library files.

Thank you