Mercurial > ecos
changeset 3001:a1ee8818f5b4
* src/stm32_misc.c (hal_start_clocks): Added optional calculation of
hal_cortexm_systick_clock when 'internal' clock source is selected.
| author | sergeig |
|---|---|
| date | Sat, 22 Jan 2011 21:18:09 +0000 |
| parents | a49edf752d44 |
| children | 990c52b02d9c |
| files | packages/hal/cortexm/stm32/var/current/ChangeLog packages/hal/cortexm/stm32/var/current/src/stm32_misc.c |
| diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/packages/hal/cortexm/stm32/var/current/ChangeLog +++ b/packages/hal/cortexm/stm32/var/current/ChangeLog @@ -1,3 +1,8 @@ +2011-01-21 Ilija Kocho <ilijak@siva.com.mk> + + * src/stm32_misc.c (hal_start_clocks): Added optional calculation of + hal_cortexm_systick_clock when 'internal' clock source is selected. + 2011-01-13 John Dallaway <john@dallaway.org.uk> * src/stm32_misc.c: Implement a profiling timer on TIM2.
--- a/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c +++ b/packages/hal/cortexm/stm32/var/current/src/stm32_misc.c @@ -236,7 +236,11 @@ void hal_start_clocks( void ) hal_stm32_hclk = hal_stm32_sysclk / CYGHWR_HAL_CORTEXM_STM32_CLOCK_HCLK_DIV; hal_stm32_pclk1 = hal_stm32_hclk / CYGHWR_HAL_CORTEXM_STM32_CLOCK_PCLK1_DIV; hal_stm32_pclk2 = hal_stm32_hclk / CYGHWR_HAL_CORTEXM_STM32_CLOCK_PCLK2_DIV; +#ifdef CYGHWR_HAL_CORTEXM_SYSTICK_CLK_SOURCE_INTERNAL + hal_cortexm_systick_clock = hal_stm32_hclk; +#else hal_cortexm_systick_clock = hal_stm32_hclk / 8; +#endif } //==========================================================================
