- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
I use the SCB SPI mode ,however the CLK signal sometimes a clock is lost.Shoe as the follow picture:
I used the follow fuction to sent the data:
Is anyone can help me ?
Solved! Go to Solution.
- Labels:
-
PSoC 4 Architecture
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the PSoC act as master? If yes, why don't you use the API we offers to do the test.
1: Start transfer:
SPIM_SpiUartPutArray(mTxBuffer, PACKET_SIZE);
2:
/* Wait for the end of the transfer. The number of transmitted data
* elements has to be equal to the number of received data elements.
*/
while(PACKET_SIZE != SPIM_SpiUartGetRxBufferSize())
{
}
3:
/* Clear dummy bytes from RX buffer */
SPIM_SpiUartClearRxBuffer();
If we act as the slave, please check the master, because the clock is offered by the master.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does the PSoC act as master? If yes, why don't you use the API we offers to do the test.
1: Start transfer:
SPIM_SpiUartPutArray(mTxBuffer, PACKET_SIZE);
2:
/* Wait for the end of the transfer. The number of transmitted data
* elements has to be equal to the number of received data elements.
*/
while(PACKET_SIZE != SPIM_SpiUartGetRxBufferSize())
{
}
3:
/* Clear dummy bytes from RX buffer */
SPIM_SpiUartClearRxBuffer();
If we act as the slave, please check the master, because the clock is offered by the master.