# STM32F407  Discovery Board timers run faster than custom board

**URL:** <https://forums.freertos.org/t/stm32f407-discovery-board-timers-run-faster-than-custom-board/2640>\
**Category:** Kernel\
**Created:** [December 5, 2014, 4:35am UTC](https://forums.freertos.org/t/stm32f407-discovery-board-timers-run-faster-than-custom-board/2640 "2014-12-05T04:35:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 5, 2014, 4:35am UTC](https://forums.freertos.org/t/stm32f407-discovery-board-timers-run-faster-than-custom-board/2640/1 "2014-12-05T04:35:29Z")

</div>

**[bg02478](https://sourceforge.net/u/bg02478/)** wrote on [Friday, December 05, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/743175f7/#655a):

FreeRTOS on Discovery board one tick = 1 msec  
FreeRTOS on custom board one tick = 10 msec (same code as running on Discovery Board)  
Uart code Interrupt driven runs on both boards  
ADC/DMA Interrupt driven code runs on both boards

Where is the setup for external crystal vs. internal oscillator?  
Would this explain the factor of 10 slower ticks?  
If not, what do I change? Just some FreeRTOS parameters?  
Would this affect the operation of GPIO pins?

Thanks

---

<div class="post-metadata">

**Author:** ![rtel](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/rtel/32/31_2.png) [@rtel](https://forums.freertos.org/u/rtel)\
**Post date:** [December 5, 2014, 9:41am UTC](https://forums.freertos.org/t/stm32f407-discovery-board-timers-run-faster-than-custom-board/2640/2 "2014-12-05T09:41:52Z")

</div>

**[rtel](https://sourceforge.net/u/rtel/)** wrote on [Friday, December 05, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/743175f7/#8f5f):

You have to tell FreeRTOS the speed at which the clock is running using configCPU\_CLOCK\_HZ in FreeRTOSConfig.h. How you configure the clock is outside the scope of FreeRTOS, and FreeRTOS has no way of knowing this (unlike a BIOS based system such as a PC there is no location it can read this information from).

Regards.

---

<div class="post-metadata">

**Author:** ![system](https://d2v6vdsk2p900z.cloudfront.net/original/1X/7fc8fdb729c645aab5b20282bbe34e57cb407be6.jpeg) [@system](https://forums.freertos.org/u/system)\
**Post date:** [December 5, 2014, 2:46pm UTC](https://forums.freertos.org/t/stm32f407-discovery-board-timers-run-faster-than-custom-board/2640/3 "2014-12-05T14:46:04Z")

</div>

**[bg02478](https://sourceforge.net/u/bg02478/)** wrote on [Friday, December 05, 2014](https://sourceforge.net/p/freertos/discussion/382005/thread/743175f7/#0e9c):

Thanks, I think I need to fix SystemInit() in system\_stm32f4xx.c
