[U-Boot-Users] AT91RM9200 CFI Flash and Timer Functions sporadically fail
Erdmann, Thomas
Thomas.Erdmann at HARTING.com
Wed Jun 27 13:44:07 CEST 2007
Hello List,
i am using a AT91RM9200-DK based board with 128Mb CFI Flash and U-Boot
1.1.5.
While erasing larger areas (>5MB)
i get "Flash erase timeout" at several adresses.
The number of wait states for flash is checked and high enough.
I triggered in cfi_flash.c in flash_status_check()
behind get_timer() and found that get_timer()
sometimes returned a negative number like 0xfff.....
The timer functions are derived from the TC0
which is a 16 timer clocked at 30MHz
with a reload value of ~30000.
An overflow appears at 1000/s (HZ=1000).
Function get_timer() calls basically get_timer_raw()
which reads the 16 bit timer TC0.
I think that overflows are not handled correctly in this
for "if( now >= lastinc" must fail
when a wrap appeared between two calls of it.
Has anyone similar problems or found a work around ?
Thanks
Thomas
--------------------------------------------------------
Absender ist HARTING Electric GmbH & Co. KG; Sitz der Gesellschaft: Espelkamp; Registergericht: Bad Oeynhausen; Register-Nr.: HRA 5602; personlich haftende Gesellschafterin: HARTING Electric Management GmbH; Sitz der Komplementar-GmbH: Espelkamp; Registergericht der Komplementar-GmbH: Bad Oeynhausen; Register-Nr. der Komplementar-GmbH: HRB 8807; Geschaftsfuhrer: Hans Peter Bollin, Dr. Dirk Steinbrink
More information about the U-Boot
mailing list