Cypress Perform

Home > Support
support.cypress.com     Bookmark and Share
Support

Knowledge Base Article



Delay between Bytes when SPIM_PutArray API is used - KBA82854

Last Updated: 12/06/2012

Question: Why is there a delay between successive bytes when the SPIM_PutArray API is used?

Answer:

When the SPIM_PutArray API is used in the SPI master component, it only calls the SPIM_WriteTxData internally multiple times. This function is blocking in nature; which means that it continuouslychecks the space in the transmit FIFO and writes to it only when there is space.

Now, when data rate of SPI is very high, there is not enough time for the CPU to keep up the speed with the SPI master’s throughput, especially when the CPU is running on lower clock rates or the code optimization level is low. In this situation, when the SPI master completes transmission of one byte of data, the next byte is yet to be written in its transmit FIFO. Therefore, there is a delay until that byte is written to the FIFO.

One method to overcome this issue is the use of DMA to transfer data from the memory array to the SPI master.


Related Categories: PSoC® 5, PSoC® 3, PSoC® Software




Provide feedback on this item to help us improve:

How likely are you to recommend this article to a friend or colleague?

Not at all likely
0
1
2
3
4
5
6
7
8
9
10
Extremely likely

Was this item helpful?
Yes
No
Maybe


Additional comments:

Email:

Sunset Owner: WEIJ; Secondary Owner: YLIU; Sunset Date: 06/06/13