mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
Misoc: Add commits and warnings about missing caculation of the timer reload value
This commit is contained in:
@@ -63,13 +63,13 @@
|
|||||||
* system clock ticks per second. That value is a user configurable setting
|
* system clock ticks per second. That value is a user configurable setting
|
||||||
* that defaults to 100 (100 ticks per second = 10 MS interval).
|
* that defaults to 100 (100 ticks per second = 10 MS interval).
|
||||||
*
|
*
|
||||||
* The RCC feeds the Cortex System Timer (SysTick) with the AHB clock (HCLK)
|
* What clock feeds the timer? What rate does the timer increment by. The
|
||||||
* divided by 8. The SysTick can work either with this clock or with the
|
* correct reload value is:
|
||||||
* Cortex clock (HCLK), configurable in the SysTick Control and Status
|
*
|
||||||
* register.
|
* reload = Finput / CLOCKS_PER_SEC
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SYSTICK_RELOAD ((MISOC_CLK_FREQUENCY / CLOCKS_PER_SEC) - 1)
|
#warning Missing logic
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Public Functions
|
* Public Functions
|
||||||
@@ -118,6 +118,7 @@ void misoc_timer_initialize(void)
|
|||||||
timer0_en_write(0);
|
timer0_en_write(0);
|
||||||
|
|
||||||
/* FIX ME, PUT PROPER VALUE */
|
/* FIX ME, PUT PROPER VALUE */
|
||||||
|
#warning Missing logic
|
||||||
|
|
||||||
timer0_reload_write(80000);
|
timer0_reload_write(80000);
|
||||||
timer0_load_write(80000);
|
timer0_load_write(80000);
|
||||||
|
|||||||
Reference in New Issue
Block a user