public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] flash v2 program problem
@ 2005-07-01 13:23 Manfred Gruber
  2005-07-01 22:54 ` Bart Veer
  0 siblings, 1 reply; 4+ messages in thread
From: Manfred Gruber @ 2005-07-01 13:23 UTC (permalink / raw)
  To: ecos-discuss

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-04 21:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-01 13:23 [ECOS] flash v2 program problem Manfred Gruber
2005-07-01 22:54 ` Bart Veer
2005-07-04  7:27   ` Manfred Gruber
2005-07-04 21:59     ` Bart Veer

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).