I use the FX3 contact to a spi chip,i use the spi with the DMA mode,the external chip need that the MOSI PIN of FX3 must be high level,but when i init the spi interface of the FX3,this pin is low level in the idel state.then i use the spi with the DMA mode to transfer and receive at the same time ,and when read data from the external chip ,i transfer oxff.but when i set to transfer and receive only one word,the CyU3PDmaChannelWaitForCompletion return is eeror(CY_U3P_ERROR_NOT_STARTED) ,
status = CyU3PDmaChannelSetupRecvBuffer (&glSpiRxHandle, &buf_p);
CyU3PSpiSetBlockXfer (1, 1);
status = CyU3PDmaChannelWaitForCompletion (&glSpiRxHandle,
if (status == CY_U3P_ERROR_NOT_STARTED)
status = CyU3PDmaChannelWaitForCompletion(&glSpiTxHandle,
if (status != CY_U3P_SUCCESS)
CyU3PSpiDisableBlockXfer (CyTrue, CyTrue);
can you tell me what is the problem?
thanks very much.
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.