About the Speed of SPI IP in Qsys in continually transmission
Hi,
I am now working on the SPI in Qsys for a cyclone iv device, I found a problem for the SPI in continually transmission, here is the details.
->The SPI clock is set to 50MHz.
->The software is quite simple:
/***********************************/
for(j=0;j<len;j++)
{while(((IORD_ALTERA_AVALON_SPI_STATUS(SPI_0_BASE))&0x0040)!=0x0040);
IOWR_ALTERA_AVALON_SPI_TXDATA(SPI_0_BASE,*(pBuf+j));
}
/***********************************/
->The purpose is to transmit a lot of data in pBuf as soon as possible.
However, I check the SPI clk in oscilloscope, the rate of clk is right as 50MHz, but after one byte(8 bit) have been transmite, there is a 'gap' about 300 ns with no clk output before the next byte transmitted.
->
The 'gap' will make the the SPI data rate reduced much , I want to know what causes it, hope somebody can help me to improve it.
Thank you.