- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use the CyU3PDmaChannelGetBuffer and CyU3PDmaChannelCommitBuffer API to sent the data from CPU to GPIF bus manually and found it is not fast enough.
I have also used a scope to trace the output data. I found that it takes 70-80 μs to complete.
Is there a way to further reduce the running time to less than 30μs of this application like using low level DMA API?
Thanks
status=CyU3PDmaChannelGetBuffer(&AppDmaFpgaRegAccessManualOutHandle,&FpgaHostManualOutBuf_p, CYU3P_NO_WAIT);
if (status != CY_U3P_SUCCESS)
{
return status;
}
//popular the Buffer of Register Read Address
FpgaHostManualOutBuf_p.buffer[0]=(FpgaHostRegAddress&0x000000FF)>>0; /*Reg Read Address*/
FpgaHostManualOutBuf_p.buffer[1]=(FpgaHostRegAddress&0x0000FF00)>>8; /*Reg Read Address*/
FpgaHostManualOutBuf_p.buffer[2]=(FpgaHostRegAddress&0x00FF0000)>>16; /*Reg Read Address*/
FpgaHostManualOutBuf_p.buffer[3]=(FpgaHostRegAddress&0xFF000000)>>24; /*Reg Read Address*/
FpgaHostManualOutBuf_p.count=4; /**< Byte count of valid data in buffer. */
FpgaHostManualOutBuf_p.size=32; /**< Actual size of the buffer in bytes. Should be a multiple of 16. */
FpgaHostManualOutBuf_p.status=0;
status = CyU3PDmaChannelCommitBuffer (&AppDmaFpgaRegAccessManualOutHandle,FpgaHostManualOutBuf_p.count,0);
if (status != CY_U3P_SUCCESS)
{
return status;
}
//get fpga register value;
status = CyU3PGpifReadDataWords (1, CyFalse, 1, RegRrData_p, 0xF0000000);
if (status != CY_U3P_SUCCESS)
{
return status;
}