Connect with us

Flash Memory Conundrum

Discussion in 'Electronic Design' started by Keith Wootten, Mar 24, 2006.

Scroll to continue with content
  1. Hi

    I'm messing with a Hynix NAND Flash chip -this one's 512MiB and is used
    in some USB pen drives. I have it hooked up to a spare uC evaluation
    board with lots of I/O and I'm bit-bashing it to test it. It's an 8 bit
    wide serial interface - quite easy to use - but it's not behaving quite
    how I'd expect.

    I've written routines to erase, write and read. As a test, my write
    function decrements the data value with each byte. It seems as if 0xFF
    is not writing. When I read back a page it seems to skip 0xFF - for
    example, 0x02, 0x01, 0x00, 0xFE, 0xFD etc. with no 0xFF apparent. I'm
    confused - the test code is all in assembler and quite straightforward.
    The page write function shifts in up to 2112 bytes at a time and writes
    them automatically.

    I know that Flash erases to 0xFF so this value wouldn't actually *write*
    in the physical sense, but I'd certainly expect it to increment the
    address and read back correctly.

    I know there's not much information here, but it seems like it may be a
    gotcha which one of you has previously encountered...

    Here's hoping,
  2. Had a similar problem with a CompactFlash card. It wasn't 0xFF, but the
    change from 0x00 to 0xFF when reading back bytes that caused the
    problem. I think it was because I was reading at high speed, and having
    all the pins change from low to high at once caused a bit of ground
    bounce. Solution was to put bigger power tracks to the CompactFlash and
    a suitable cap really close to the power inputs.

    Just to check try writing 0x00 0xff 0x00 0x00 0xff 0xff 0x00 0x00 0x00
    0xff 0xff 0xff etc and see what you get.

  3. Thanks Ross, I'll try that today - I'm not reading at high speed (bit
    banged parallel ports) but there are ~150mm wires to the chip in my test
    setup so it seems quite possible - my decoupling caps are near the chip
    but could be closer too.

  4. You gottit.

    Thanks, Ross.
  5. Glad to be of help!

Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day