SPIM reading external memory incorrectly | Cypress Semiconductor
SPIM reading external memory incorrectly
Basically, the SPIM will rotate bits as they are read into the PSoC3.... WARNING - not all chips present this problem! Some PSoC chips are NOT PRONE to this rotation! Other chips CONSISTANTLY show the problem!
Yes, a demo project is available on request! firstname.lastname@example.org
Project: Create an SPIM with the normal IO (not bidirectional), mode 0. Disconnect the CS (SS) and connect to non-hardware pin. Chip used is a CY8C3866PVI-021ES2. I tried the DVK and it too gives this problem!
I'm using Ramtron FM25V05 as external memory, so grab a data sheet and notice that the word is similar (not identical!!!) to the Apps Note EP60810 - I.E. a multiple data word must be sent while the CS is low. I have pins 3 and 7 tied high, by the way. Well, the write needs two dips in the CS, but...
Speed - 3MHz, internal clock. Leave the buffers set at 4. I use the RESET pin to hold the SPIM non-functional and tri-state the IO as the Ramtron needs to be read by another processor. No interrupts.
Read/write various bit patterns as a BLOCK (one start address, many data). I need to block move data on occasion for my project.
I get bit rotations! Writing 16 (0x10) locations of "0x80" results in a READ of "0xC0" for the 0x10 locations! All the same!
Heres a list of some stuff I tried: 0x00 -> 0x00, 0xff -> 0xff, 0x55 -> 0x2a, 0xaa -> 0xd5, 0x80 -> 0xc0, 0x01 -> 0x00; 0x88 -> 0xc4, 0x11 -> 0x08.... Curiously, reading in, say, 0x15 locations does not reveal that the 0x11'th location contains incorrect data. You might expect this if the bit pattern is rotating to the next byte in the stream. So the stream is not polluted? Or can I say that?