2011-03-10 12:32:52     Any way to mark bad block in M25P80 flash?

Document created by Aaronwu Employee on Sep 25, 2013
Version 1Show Document
  • View in full screen mode

2011-03-10 12:32:52     Any way to mark bad block in M25P80 flash?

Steve Strobel (UNITED STATES)

Message: 98851   

 

We have a custom BF537 board with a M25P80 SPI flash chip that just failed for a customer.  U-Boot starts OK, but it complains of a bad magic number when trying to start uClinux with the commands:

 

    eeprom read $(loadaddr) 0x80000 0xD80000;bootm $(loadaddr)

 

I had the customer run two tests on the flash to see if it could set and clear each of the bits in that region of the flash.  The first succeeds, the second fails with the message "total of 3956 bytes were the same" (it should say "Total of 14155776 bytes were the same").  Those tests are:

 

        mw.b 0x1000000 0x55 0xD80000

        eeprom write 0x1000000 0x80000 0xD80000

        eeprom read 0x2000000 0x80000 0xD80000

        cmp.b 0x1000000 0x2000000 0xD80000

 

 

 

        mw.b 0x1000000 0xAA 0xD80000

        eeprom write 0x1000000 0x80000 0xD80000

        eeprom read 0x2000000 0x80000 0xD80000

        cmp.b 0x1000000 0x2000000 0xD80000

 

Is there any way to deal with this problem besides replacing the flash chip, such as forcing a block of the flash to be marked bad?  My guess is that such bad block handling is typically handled by flash file systems of various sorts and that when using raw eeprom read/write commands like this that such error handling is not possible.  I would welcome being told otherwise

 

Steve

QuoteReplyEditDelete

 

 

2011-03-10 15:07:49     Re: Any way to mark bad block in M25P80 flash?

Mike Frysinger (UNITED STATES)

Message: 98854   

 

SPI flashes have no support for bad blocks by design.  your only option would be to manually partition around it.

QuoteReplyEditDelete

 

 

2011-03-10 18:17:31     Re: Any way to mark bad block in M25P80 flash?

Steve Strobel (UNITED STATES)

Message: 98859   

 

Thanks, Mike.

Attachments

    Outcomes