From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4313 invoked by alias); 9 Jun 2006 18:02:29 -0000 Received: (qmail 4303 invoked by uid 22791); 9 Jun 2006 18:02:28 -0000 X-Spam-Check-By: sourceware.org Received: from sta-204-188-98-27.rockynet.com (HELO hermes.chez-thomas.org) (204.188.98.27) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 09 Jun 2006 18:02:23 +0000 Received: by hermes.chez-thomas.org (Postfix, from userid 999) id 042411950176; Fri, 9 Jun 2006 12:02:20 -0600 (MDT) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by hermes.chez-thomas.org (Postfix) with ESMTP id 2CCEB19500BC; Fri, 9 Jun 2006 12:02:17 -0600 (MDT) From: Gary Thomas To: Jay Foster Cc: "'ecos-discuss@ecos.sourceware.org'" In-Reply-To: <74C9525D67A5FF4791614FDB06593BB1028626@mail.systech.com> References: <74C9525D67A5FF4791614FDB06593BB1028626@mail.systech.com> Content-Type: text/plain Date: Fri, 09 Jun 2006 18:02:00 -0000 Message-Id: <1149876136.22880.60.camel@hermes> Mime-Version: 1.0 X-Mailer: Evolution 2.6.2 (2.6.2-1.fc5.5) Content-Transfer-Encoding: 7bit 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] Flash Driver Read/Write Alignment Question X-SW-Source: 2006-06/txt/msg00099.txt.bz2 On Fri, 2006-06-09 at 10:06 -0700, Jay Foster wrote: > I am puzzling over how the eCos flash drivers are supposed to work when > using 16-bit wide flash devices. I'm using an ARM architecture (ARM7TDMI, > ARM940T), and the AMD AM29LV160 flash device connected in the 16-bit wide > mode (CYGNUM_FLASH_WIDTH=16). > > Looking at the flash driver code, this defines the flash_data_t as a 16-bit > type. This results in all accesses to the flash device to be performed as > 16-bit reads/writes. > > The flash driver defines some special addresses (FLASH_Setup_Addr1, > FLASH_Setup_Addr2, etc.). At least one of these will be defined as an odd > address. This will result in an unaligned transfer, causing a DATA ABORT > exception. What am I missing here? They should not end up at odd addresses since they are cast to the FLASH element type. If this is 16 bit, Addr(0xA55) == 0x14AA, etc. If you're ending up with alignment issues, then you've configured your FLASH driver incorrectly (check the defines). There are lots of examples of 16 and 32 bit device setups, as well as some parallel and banked layouts. -- ------------------------------------------------------------ Gary Thomas | Consulting for the MLB Associates | Embedded world ------------------------------------------------------------ -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss