[U-Boot-Users] i.MX31: question about CFG_HZ and CKIL

Jens Gehrlein sew_s at tqs.de
Wed May 14 08:36:37 CEST 2008


Hi Wolfgang, Guennadi,

Wolfgang Denk schrieb:
> In message <48216F73.4010809 at tqs.de> you wrote:
>> If CKIL is the above mentioned 32 kHz clock, the resulting deviation in 
>> the timers is "only" about 2.4% as long as CFG_HZ in mx31ads.h is 32000 
>> Hz. Although it works with the current definition, I'd like to know your 
>> opinions, whether it is necessary to adjust this value.
> 
> Note that CFG_HZ is not really configurable, even if the name suggests
> so. In reality, CFG_HZ is a constant with the value 1000.
> 
> There are some broken boards which don't handle this  correctly,  but
> at least that's what you should set.

So, as far as I understood the function get_timer() must also return a 
value that is counted up 1000 times per second. But according to 
cpu/arm1136/mx31/interrupt.c this is not the case. GPTCNT is updated 
with 32000 or 32768 Hz, and this counter register's value is currently 
returned by get_timer() (minus base, passed by the caller).

If CFG_HZ should be set to 1000 than cpu/arm1136/mx31/interrupt.c should 
be fixed, i.e. the prescaler had to be adjusted from 1 to approx. 33. Do 
you agree or did I understand this timer stuff completely wrong?

Best regards,
Jens





More information about the U-Boot mailing list