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
This commit is contained in:
Amaury Pouly 2012-10-21 14:42:32 +02:00
parent e86991f484
commit 709827b5ea
2 changed files with 3 additions and 3 deletions

View file

@ -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;
}