All,
I am using an adsp21364 tied to a serial flash module. In order to read data from this module I must first transmit a command word over SPI. Easy enough.
The problem is that the flash module begins transmitting the first bit of the requested data immediately after receiving the command. My question is if the only way to initiate full duplex communication via SPI is to utilize DMA transfer for receive?
Or can I immediately reconfigure the SPICTL (without disabling SPI) register to initiate a master core receive fast enough to be able to capture the data the flash module is transmitting?
Thanks much.
Hi Ruben,
I am not exactly clear about the problem. The reason is that DSP being the master, it should send only the required number of clock pulses to the SPI flash when sending the read command the the SPI flash and then stop. The DSP then can initiate the next transfer (transmit/receive) only when needed.
Could you please mention what FLASH device you are using and what are the CLKPL and CPHASE settings for the SPI transfer ? It would also be helpful if you could attach a snapshot of the waveforms showing the problem you are facing.
Thanks,
Mitesh
Note that though the SPI DMA can be configured to initiate the transfer in DMA mode, the SPI simultaneously shifts in and shifts out the data on MISO and MOSI data lines. You need to write the TXSPI register with the command need to be send to the flash for sending all the values needed.
I hope it helps you.
Milos