TIM2 Interrupt period issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-22 12:49 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-22 2: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).Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-22 5: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.- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2015-02-22 6: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()Up vote any posts that you find helpful, it shows what's working..
