0
\$\begingroup\$

I'm using CC2640, and N25Q128A (Micron Serial NOR Flash Memory). SPI is working well, erase and write commands are changing the status register so busy flag rises and i'm waiting until it's clear.

The only problem i'm facing is read command, when i'm sending the read command with 3 byte of address the memory is rising miso pin and does not release until c# pin is rise again.

salea screen shot

I cleared the ReadLock register and set the WriteEnable register, and now here i am... asking why it's happen and how to fix the issue?

\$\endgroup\$
2
\$\begingroup\$

The flash chip is an SPI slave, which means that it depends on you, the master, to provide ALL clock pulses, even when reading from the chip. You seem to have stopped your SPI clock after sending the read command and address. That big delay before the 10 bytes of clocking (I'm assuming you wanted to read 10 bytes) shouldn't really matter though because you didn't release the enable line, but you don't really want to have that big gap there.

The other thing is that freshly-erased flash contains all 0xFF (high bits). If you erase some of the chip then attempt to read it, the MISO pin will remain high because it's sending you lots of 0xFF bytes.

Try erasing a sector, writing a test-string to it and then attempting to read it back.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.