From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5857 invoked by alias); 1 Jul 2005 13:23:40 -0000 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 Received: (qmail 5740 invoked by uid 22791); 1 Jul 2005 13:23:35 -0000 Received: from mail.contec.at (HELO mail.contec.at) (213.229.28.240) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 01 Jul 2005 13:23:35 +0000 Received: from fs-1.contec-int.at (unknown [192.168.1.221]) by mail.contec.at (Postfix) with ESMTP id 38AFA370C7 for ; Fri, 1 Jul 2005 15:16:48 +0200 (CEST) Received: from grma-linux-2.contec-int.at ([192.168.1.216]) by fs-1.contec-int.at with Microsoft SMTPSVC(5.0.2195.6713); Fri, 1 Jul 2005 15:23:21 +0200 From: Manfred Gruber To: Date: Fri, 01 Jul 2005 13:23:00 -0000 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <200507011523.14520.gruber.m@utanet.at> Subject: [ECOS] flash v2 program problem X-SW-Source: 2005-07/txt/msg00017.txt.bz2 Hi ! I use flash_v2 branch and have a problem on program my device. I use a AM29LV256, 2 x 16 bit devices on a 32 bit bus . On testing I found out that Toggle Bit DQ6 functionality fails sometimes on my hardware. I had done a quick dirty hack, with that it works. can someone tell me why? #ifdef MICRO9_FLASH_V2_CHANGES // Quick dirty hack do { current = addr[i]; if ((current & AM29_STATUS_DQ7) == masked_datum) { break; } if (0 != (current & AM29_STATUS_DQ5)) { continue; } } while (retries-- > 0); #else // original version do { current = addr[i]; if ((current & AM29_STATUS_DQ7) == masked_datum) { break; } if (0 != (current & AM29_STATUS_DQ5)) { // It's possible that one device can finish before // another. To deal with this we look at the DQ6 // toggle bit, and only consider this to be an error // if it is still toggling for the device that's // reporting DQ5 set. This is similar to the checking // for erase timeouts above. This is unnecessary // before DQ5 gets set, so we don't do the double read // all the time. current2 = addr[i]; -->>>> Sometimes my devices fail here .... if ((((current ^ current2) & AM29_STATUS_DQ6) >> 1) & current) { // A timeout has occurred inside the hardware and // the system is in a strange state. Reset but don't // try to write any more of the data. block_start[AM29_OFFSET_COMMAND] = AM29_COMMAND_RESET; return; } } } while (retries-- > 0); #endif for example it fails with this values: am29xxxxx_hw_programm: current 0xff847abf current2 0xffc45a5a AM_STATUS 400040 ((((current ^ current2) & AM29_STATUS_DQ6) >> 1) & current) --> 200020 i tried to use the toggle bit algorithm from my am29lv256 documentation, but without sucess. maybe some flash_v2 developer has a mor information for me what goes wrong? regards manfred -- Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss