public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
From: Manfred Gruber <gruber.m@utanet.at>
To: <ecos-discuss@sources.redhat.com>
Subject: [ECOS] flash v2 program problem
Date: Fri, 01 Jul 2005 13:23:00 -0000	[thread overview]
Message-ID: <200507011523.14520.gruber.m@utanet.at> (raw)

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

             reply	other threads:[~2005-07-01 13:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-01 13:23 Manfred Gruber [this message]
2005-07-01 22:54 ` Bart Veer
2005-07-04  7:27   ` Manfred Gruber
2005-07-04 21:59     ` Bart Veer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200507011523.14520.gruber.m@utanet.at \
    --to=gruber.m@utanet.at \
    --cc=ecos-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).