From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13004 invoked by alias); 23 May 2006 09:13:17 -0000 Received: (qmail 12988 invoked by uid 22791); 23 May 2006 09:13:16 -0000 X-Spam-Check-By: sourceware.org Received: from londo.lunn.ch (HELO londo.lunn.ch) (80.238.139.98) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 23 May 2006 09:13:06 +0000 Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1FiSwm-0004Hx-00; Tue, 23 May 2006 11:13:00 +0200 Date: Tue, 23 May 2006 09:13:00 -0000 To: David Vrabel Cc: "Neundorf, Alexander" , ecos-discuss@ecos.sourceware.org Message-ID: <20060523091300.GA16080@lunn.ch> Mail-Followup-To: David Vrabel , "Neundorf, Alexander" , ecos-discuss@ecos.sourceware.org References: <5A8A17126B73AC4C83968F6C4505E3C504315E0F@JO-EX01.JENOPTIK.NET> <4472D055.8040201@arcom.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4472D055.8040201@arcom.com> User-Agent: Mutt/1.5.11+cvs20060403 From: Andrew Lunn X-IsSubscribed: yes Mailing-List: contact ecos-discuss-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: ecos-discuss-owner@ecos.sourceware.org Subject: Re: [ECOS] how to measure time from within flash_program_buf X-SW-Source: 2006-05/txt/msg00191.txt.bz2 On Tue, May 23, 2006 at 10:05:25AM +0100, David Vrabel wrote: > Neundorf, Alexander wrote: > > Hi, > > > > in the Intel 28fxxx flash driver there is a timeout used, and this > > timeout is specified as a simple loop which is executed 5000000 > > times. Now we have a fast processor and a slow flash, so for us this > > timeout isn't big enough. We could simply increase the count, but > > this still depends on flash and processor speed. > > I'd have suggested putting HAL_DELAY_US() macro calls in the loop. That > would give you a lower bound on the timeout. However, I think it it has > the same problem as HAL_CLOCK_READ() below. > > How about sticking a few more functions (like hal_delay_us) in .2ram ? These functions are normally in the platform HAL, or varient HAL. So you would have to change every target. A lot of work... Also, i work on a target which has a reasonable amount of flash and very little RAM. I don't want these functions in RAM because i don`t have space for them and my flash driver does not require them. Andrew -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss