Hi,
our custom board has an FRAM device (FM25L16) connected to a C5502 via McBSP #1. The FRAM demands an SPI protocol and the the pins are connected as suggested in the McBSP user guide (nCS to FSX, SO to DR, SI to DX, SCK to CLKX) and I can make the FRAM (slave) work as expected.
The problem arises with the SPI message protocol demanded by the FRAM. With the given SPI configuration I need to write an 8-bit Write Enable opcode followed by a 32-bit Write message to set each byte of data in the FRAM. The rising edge of nCS clears the write enable latch and the next write operation needs to set this flag again.
This sequence means that the write time for a kilobyte of data is much longer than ideal and does not meet our requirements.
The FRAM allows multiple bytes to be written in a single operation by holding the nCS low and continuing to drive the clock and data lines - i.e. by effectively producing a word of data longer than 32-bits. Thus in theory a kilobyte of data could be written in 1028 (8-bit Write Enable, 8-bit Write opcode, 16-bit start address, 1024-bytes data) bytes at 18MHz. Instead we're looking at 40-bits per byte plus overhead.
This doesn't seem possible with the McBSP operating in SPI mode however. I cannot see a way of driving the nCS line longer than 32-bits (accomplished by using a XWDLEN1 of 32-bits). Is it possible to do this somehow, or am I limited in how I can use the FRAM?
One alternative consideration would be to connect the nCS line to a GPIO line instead and drive in software, but I think this would prove impossible in practice to sync the start of the frame with the data Tx event.
Any help welcomed.
Chris.