GPIO and clock configuration of STM32F427VG
You need to do more than replace the stm32f4xx file.  See http://clockspeeds.blogspot.com/2013/01/stm32f4-discovery-clock-frequency.html.  In particular, you have to do some work on the startup_stm32f4xx.c file.

From that site:

&gt; STEP 3: In stm32f4xx.h file ensure HSE (external clock) value is 8 MHz
&gt; 
&gt; 
&gt; #if !defined  (HSE_VALUE)   #define HSE_VALUE    ((uint32_t)8000000) /*!&lt; Value of the External oscillator in Hz */
&gt; #endif /* HSE_VALUE */
&gt; 
&gt; 
&gt; STEP 4: In startup_stm32f4xx.c file change comment on SystemInit()
&gt; function
&gt; 
&gt; 
&gt; /*----------Function
&gt; prototypes-----------------------------------------------*/ extern int
&gt; main(void);           /*!&lt; The entry point for the application.    */
&gt; //extern void SystemInit(void);    /*!&lt; Setup the microcontroller
&gt; system(CMSIS) */ void Default_Reset_Handler(void);   /*!&lt; Default
&gt; reset handler                */ static void Default_Handler(void); 
&gt; /*!&lt; Default exception handler            */
&gt; 
&gt; to
&gt; 
&gt; /*----------Function
&gt; prototypes-----------------------------------------------*/ extern int
&gt; main(void);           /*!&lt; The entry point for the application.    */
&gt; extern void SystemInit(void);    /*!&lt; Setup the microcontroller
&gt; system(CMSIS) */ void Default_Reset_Handler(void);   /*!&lt; Default
&gt; reset handler                */ static void Default_Handler(void); 
&gt; /*!&lt; Default exception handler            */
&gt; 
&gt; STEP 5: On the same file down under there will be a function
&gt; 
&gt; void Default_Reset_Handler(void)
&gt; 
&gt; after assembly code towards the end add a line of code calling
&gt; SystemInit() BEFORE calling main() ie, change to
&gt; 
&gt; SystemInit(); main();
&gt; 
&gt; That`s it! now in main function we can add 
&gt; 
&gt; RCC_HSEConfig(RCC_HSE_ON); while(!RCC_WaitForHSEStartUp()) { }