2015-02-22 12:49 PM
2015-02-22 02:58 PM
Are you sure it's not clocking off the HSI source (16 MHz). Review code in SystemInit(), and system_stm32f4xx.c. That the PLL locks, and it's selected as a source.
Internal clocks can also be output via MCO1 (PA8).2015-02-22 05:41 PM
Thanks Clive. The SystemInit() prototype was still commented out in ''startup_stm32f4xx.h'' and was never being called either. I think this results in defaulting to the HSI for the system clock?
I also corrected HSE_VALUE in ''stm32f4xx.h'' from the default 25MHz to 8Mhz so I can use the external crystal. It's working now. Thanks again.2015-02-22 06:41 PM
The mechanics of the CMSIS implementation have SystemInit() called prior to the usual C startup code, and main()
With both Keil and IAR, you'd expect to see a assembler level call to SystemInit from the ResetHandler code. Other systems like CooCox which ignore the usual route have to call SystemInit from main()