- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a problem,i use the fx3 chip,and i use the spi with the DMA mode ,i enable both transfer and receive,i want to know can i transfer and receive only one word every time?
status = CyU3PDmaChannelSetupRecvBuffer (&glSpiRxHandle, &buf_p);
CyU3PDmaChannelSetupSendBuffer (&glSpiTxHandle,&s_buf);
CyU3PSpiSetBlockXfer (1, 1);
status = CyU3PDmaChannelWaitForCompletion(&glSpiTxHandle,CY_FX_USB_SPI_TIMEOUT);
status = CyU3PDmaChannelWaitForCompletion(&glSpiTxHandle,CY_FX_USB_SPI_TIMEOUT);
CyU3PSpiDisableBlockXfer (CyTrue, CyTrue);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can refer to UsbSpiDmaMode example given in the FX3 SDK. Can you tell me what is the size of word? 16 or 32? CyU3PDmaChannelSetupRecvBuffer has a restriction of 32bytes multiple when the DCache is enabled.
Attach you firmware for reference.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks for you answer,the word is 8bit,is there some ways to transfer and receive one byte?