summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/imx233/timer-imx233.c
diff options
context:
space:
mode:
authorAmaury Pouly <amaury.pouly@gmail.com>2012-10-21 14:42:32 +0200
committerAmaury Pouly <amaury.pouly@gmail.com>2012-10-21 14:45:09 +0200
commit709827b5ea23f0df86a8056b73bf71fa93cc6681 (patch)
tree0350774c2897d483c624e71fefd1191bd3e936b7 /firmware/target/arm/imx233/timer-imx233.c
parente86991f484f29891b969e851680f66e1948542fa (diff)
downloadrockbox-709827b5ea23f0df86a8056b73bf71fa93cc6681.tar.gz
rockbox-709827b5ea23f0df86a8056b73bf71fa93cc6681.tar.bz2
rockbox-709827b5ea23f0df86a8056b73bf71fa93cc6681.zip
imx233: fix user timer
The running count is only 16-bit wide, since the always tick setting derives from the crystal clock at 24MHz the user timer cannot be set lower than ~300Hz which is already too high. Switch to the 32KHz crystal source to fix this. Change-Id: Ie7775460b17ea7ab331738734e3d688ad5563857
Diffstat (limited to 'firmware/target/arm/imx233/timer-imx233.c')
-rw-r--r--firmware/target/arm/imx233/timer-imx233.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/target/arm/imx233/timer-imx233.c b/firmware/target/arm/imx233/timer-imx233.c
index bcc1974c63..4175dde95a 100644
--- a/firmware/target/arm/imx233/timer-imx233.c
+++ b/firmware/target/arm/imx233/timer-imx233.c
@@ -58,7 +58,7 @@ bool timer_set(long cycles, bool start)
bool timer_start(IF_COP_VOID(int core))
{
imx233_setup_timer(USER_TIMER_NR, true, timer_cycles,
- HW_TIMROT_TIMCTRL__SELECT_TICK_ALWAYS, HW_TIMROT_TIMCTRL__PRESCALE_1,
+ HW_TIMROT_TIMCTRL__SELECT_32KHZ_XTAL, HW_TIMROT_TIMCTRL__PRESCALE_1,
false, &timer_fn);
return true;
}