[U-Boot-Users] WG: AT91RM9200 CFI Flash and Timer Functions sporadically fail - SOLVED -

The problem was the 32 bit variable "timestamp" in interrupts.c. The 16 bit timer TC0 is clocked with 30MHz and "software extended" to 32 bit in timestamp. It gets an overflow all ~133s. When the overflow falls in an flash erase or flash program cycle a false timeout is detected. My work around is to zero the counter "timestamp" before each flash_status_check().
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

On Thu, 28 Jun 2007 13:59:34 +0200, Erdmann, Thomas wrote:
The problem was the 32 bit variable "timestamp" in interrupts.c. The 16 bit timer TC0 is clocked with 30MHz and "software extended" to 32 bit in timestamp. It gets an overflow all ~133s. When the overflow falls in an flash erase or flash program cycle a false timeout is detected.
Exactly. I posted a patch to fix this on the 28. february, see http://sourceforge.net/mailarchive/message.php?msg_name=1172671129l.26528l.1...
Cheers Anders
participants (2)
-
Anders Larsen
-
Erdmann, Thomas