From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15922 invoked by alias); 26 May 2006 20:57:34 -0000 Received: (qmail 15807 invoked from network); 26 May 2006 20:57:02 -0000 Received: from unknown (202.80.33.51) by sourceware.org with QMTP; 26 May 2006 20:57:02 -0000 Received: (qmail 11668 invoked from network); 26 May 2006 20:56:59 -0000 X-Anti-Virus: Message scanned for viruses by TVL Received: from dsl2-modem31.tvl.vu (HELO [192.168.2.14]) ([202.80.43.31]) (envelope-sender ) by mail.vanuatu.com.vu (qmail-ldap-1.03) with SMTP for ; 26 May 2006 20:56:59 -0000 Message-ID: <44776B9A.6010309@sakuraindustries.com> Date: Sat, 27 May 2006 00:02:00 -0000 From: Steven Johnson User-Agent: Mozilla Thunderbird 1.0.6-7.2.20060mdk (X11/20050322) MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: GDB support for Flash memory programming References: <4474F8D3.3000708@sakuraindustries.com> <44751B5C.6090006@sakuraindustries.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-05/txt/msg00375.txt.bz2 Jim Blandy wrote: > >On the board I happen to have handy, it takes 26 seconds to write a >full 128k flash sector over the JTAG interface. Unless this is >extremely slow compared to what's typical out there, I'd tend to agree >that preserving unloaded sector contents is important to leave >optional, or not require at all. I wouldn't mind waiting a handful of >seconds, but even ten would be too long. > > Yes, also, you don't want (or need) to do it if the whole sector is going to be programmed. Maybe another memory attribute would be "Preserve unaltered contents of flash on reprogram" To put it in perspective (I don't know what type of flash you have, if you give me a part number, I'd be interested to do this analysis on your part), Using an accelerated buffer programming algorithm for the Spansion S29GL family of flash the following is the theoretical typical case sector programming time: Typical time to program 32 bytes = 240us Therefore 128K Bytes / 32 * 240us = 983ms total typical sector programming time It might be an unfair comparison, so using the traditional "Byte at a time" algorithm for the same family, we get: Typical time to program 1 byte = 60us Therefore 128K Bytes * 60us = 7.8 seconds total typical sector programming time Both of which are significantly under your JTag Speeds to do the same operation. However that said, your Jtag speeds are very respectable, I've seen lots worse, 10-20 (or more) times slower programming of flash over Jtag. Steven J