Hello everyone ,I am working with a board based on S3C2440A .
I am trying to transmit datas & commands from S3C2440A to a FRAM_CHIP hang on the S3C2440A' SPI_bus. I find that S3C2440 only have 8 bit spi_bus_width. But in fact I need the flow of bits to be continuously at least in a 32 bits. I know that some chips such as S5PC100 have 8-32 spi_bus_width,how can I make it with S3C2440?
The follow is the code I did,and there was a interval between each flow of 8bit when I observe the SPIMOSI0 & SPICLK signal with oscilloscope.
extern void inline TxSPI0_Byte(U8 data) { rSPTDAT0=data; while(!(rSPSTA0&0x01));//wait until Tx/Rx ready } extern void WrMemStatReg(unsigned char data) //CMD to operate FRAM { SPICS_LOW; //FRAM CS ON TxSPI0_Byte(WRSR_CMD);//wave A --8bit TxSPI0_Byte(data); //wave B --8bit SPICS_HIGH; } wave A and wave B are not continuously
"But in fact I need the flow of bits to be continuously at least in a 32 bits."
Very rarely you will run into such a beast that requires "continuous" bits to be transmitted - aka no "pause" of the serial clock.
Having said that, the typical way for (near) continuous transmission is to use an interrupt, particularly in cases where the module is double-buffered (for example, it has a transmitter empty status).
On the receiver side, you can use similar tricks. The difficulty there is that spi can be of very high speed and in those cases utilizing DMA is your only hope for non-interrupted reception.
I am happy to report that I managed to restore the bootloader of all the faulty code chips by using my ulink. Really a great piece of programmer for the price!! The software interface is very user friendly too !