Flash Memory Conundrum

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,

--
Keith Wootten
Reply to
Keith Wootten
Loading thread data ...

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.

Ross

Reply to
Ross Marchant

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.

Cheers

--
Keith Wootten
Reply to
Keith Wootten

In message , Keith Wootten writes

You gottit.

Thanks, Ross.

--
Keith Wootten
Reply to
Keith Wootten

Glad to be of help!

Ross

Reply to
Ross Marchant

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.