EasyManuals Logo

Cypress EZ-USB FX3 User Manual

Cypress EZ-USB FX3
660 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #182 background imageLoading...
Page #182 background image
EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 182
Low Performance Peripherals (LPP)
CyU3PDebugPrint (2, "SPI READ command failed\r\n");
CyU3PSpiSetSsnLine (CyTrue);
}
CyU3PSpiSetBlockXfer (0, glSpiPageSize);
status = CyU3PDmaChannelSetupRecvBuffer (&glSpiRxHandle, &buf_p);
if (status != CY_U3P_SUCCESS)
{
CyU3PSpiSetSsnLine (CyTrue);
}
status = CyU3PDmaChannelWaitForCompletion (&glSpiRxHandle, 5000);
if (status != CY_U3P_SUCCESS)
{
CyU3PSpiSetSsnLine (CyTrue);
}
CyU3PSpiSetSsnLine (CyTrue);
CyU3PSpiDisableBlockXfer (CyFalse, CyTrue);
}
else /* Write */
{
location[0] = 0x02; /* Write command */
buf_p.size = glSpiPageSize;
buf_p.count = glSpiPageSize;
status = CyFxSpiWaitForStatus ();
CyU3PSpiSetSsnLine (CyFalse);
status = CyU3PSpiTransmitWords (location, 4);
if (status != CY_U3P_SUCCESS)
{
CyU3PDebugPrint (2, "SPI WRITE command failed\r\n");
CyU3PSpiSetSsnLine (CyTrue);
}
CyU3PSpiSetBlockXfer (glSpiPageSize, 0);
status = CyU3PDmaChannelSetupSendBuffer (&glSpiTxHandle, &buf_p);
if (status != CY_U3P_SUCCESS)
{
CyU3PSpiSetSsnLine (CyTrue);
}
status = CyU3PDmaChannelWaitForCompletion(&glSpiTxHandle, 5000);
if (status != CY_U3P_SUCCESS)
{
CyU3PSpiSetSsnLine (CyTrue);
}
CyU3PSpiSetSsnLine (CyTrue);
CyU3PSpiDisableBlockXfer (CyTrue, CyFalse);
}
/* Update the parameters */
byteAddress += glSpiPageSize;
buf_p.buffer += glSpiPageSize;
pageCount --;

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Cypress EZ-USB FX3 and is the answer not in the manual?

Cypress EZ-USB FX3 Specifications

General IconGeneral
BrandCypress
ModelEZ-USB FX3
CategoryController
LanguageEnglish

Related product manuals