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
I should have give you more information,here is the code how i set the SPICON:
void fram_con_init(void){ rGPCCON=0x45; rGPECON=((2<<26)|(2<<24)|(2<<22)); rGPCUP&=0xffff;//pullup_enable---out rGPEUP&=0xf7ff; //gpe11,12,13---so,si,clk } extern void FRAM_SPI_Init(void) { fram_con_init(); FRAM_HOLD_HIGH; SPICS_HIGH; //FRAM_SPI CS disable rSPPRE0=PCLK/2/SpiBaudRate-1;//SET SpiBaudRate rSPCON0=(0<<6)|(1<<5)|(1<<4)|(1<<3)|(0<<2)|(0<<1)|(0<<0); //Polling mode,dis-SCK,master,low,B,normal rSPPIN0=(0<<2)|(0<<0);//dis-ENMUL,SBO,release }
Any suggestion will be great!
Thanks for the help.