This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

flash v2 program problem


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]