Tiva Timer: Revert the previous change. Thre is a better way to handler timerout interrupts.
Removed setting of the initial timer interval load value (or, rather, it is always set to zero for a free-running timer). Also, do not unconditional enable the timer out interrupt. The timerout interrupt is not not enabled until tiva_timer32_setinterval() is called.
This commit is contained in:
parent
ef409169fa
commit
f374e5fde4
@ -65,10 +65,6 @@ config DK_TM4C129X_TIMER_DEVNAME
|
||||
string "Timer device name"
|
||||
default "/dev/timer0"
|
||||
|
||||
config DK_TM4C129X_TIMER_TIMEOUT
|
||||
int "Timer interval (microseconds)"
|
||||
default 10000
|
||||
|
||||
config DK_TM4C129X_TIMER_ALTCLK
|
||||
bool "Use alternate clock source"
|
||||
default n
|
||||
|
@ -684,7 +684,6 @@ Timers
|
||||
Application Configure -> Examples -> Timer Example
|
||||
CONFIG_EXAMPLES_TIMER=y
|
||||
CONFIG_EXAMPLE_TIMER_DEVNAME="/dev/timer0"
|
||||
CONFIG_EXAMPLE_TIMER_INTERVAL=1000000
|
||||
CONFIG_EXAMPLE_TIMER_DELAY=100000
|
||||
CONFIG_EXAMPLE_TIMER_NSAMPLES=20
|
||||
|
||||
|
@ -83,10 +83,6 @@
|
||||
# define CONFIG_DK_TM4C129X_TIMER_DEVNAME "/dev/timer0"
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_DK_TM4C129X_TIMER_TIMEOUT
|
||||
# define CONFIG_DK_TM4C129X_TIMER_TIMEOUT 10000
|
||||
#endif
|
||||
|
||||
#undef CONFIG_DK_TM4C129X_TIMER_ALTCLK
|
||||
#define ALTCLK false
|
||||
|
||||
@ -107,10 +103,8 @@ int tiva_timer_initialize(void)
|
||||
int ret;
|
||||
|
||||
timvdbg("Registering TIMER%d at %s\n", GPTM, CONFIG_DK_TM4C129X_TIMER_DEVNAME);
|
||||
timvdbg("Initial timer period: %d uS\n", CONFIG_DK_TM4C129X_TIMER_TIMEOUT);
|
||||
|
||||
ret = tiva_timer_register(CONFIG_DK_TM4C129X_TIMER_DEVNAME, GPTM,
|
||||
CONFIG_DK_TM4C129X_TIMER_TIMEOUT, ALTCLK);
|
||||
ret = tiva_timer_register(CONFIG_DK_TM4C129X_TIMER_DEVNAME, GPTM, ALTCLK);
|
||||
if (ret < 0)
|
||||
{
|
||||
timdbg("ERROR: Failed to register timer driver: %d\n", ret);
|
||||
|
Loading…
Reference in New Issue
Block a user