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 #175 background imageLoading...
Page #175 background image
EZ-USB FX3 Technical Reference Manual, Document Number: 001-76074 Rev. *F 175
Low Performance Peripherals (LPP)
while (pageCount != 0)
{
if (isRead) /* Read */
{
/* Update the preamble information. */
preamble.length = 4;
preamble.buffer[0] = devAddr;
preamble.buffer[1] = (uint8_t )(byteAddress >> 8);
preamble.buffer[2] = (uint8_t)(byteAddress & 0xFF);
preamble.buffer[3] = (devAddr | 0x01);
preamble.ctrlMask = 0x0004;
buf_p.size = glI2cPageSize;
buf_p.count = glI2cPageSize;
status = CyU3PI2cSendCommand (&preamble, glI2cPageSize, isRead);
status = CyU3PDmaChannelSetupRecvBuffer (&glI2cRxHandle, &buf_p);
status = CyU3PDmaChannelWaitForCompletion(&glI2cRxHandle, 0x7FFF);
}
else /* Write */
{
/* Update the preamble information. */
preamble.length = 3;
preamble.buffer[0] = devAddr;
preamble.buffer[1] = (uint8_t)(byteAddress >> 8);
preamble.buffer[2] = (uint8_t)(byteAddress & 0xFF);
preamble.ctrlMask = 0x0000;
buf_p.size = glI2cPageSize;
buf_p.count = glI2cPageSize;
status = CyU3PDmaChannelSetupSendBuffer (&glI2cTxHandle, &buf_p);
status = CyU3PI2cSendCommand (&preamble, glI2cPageSize, isRead);
status = CyU3PDmaChannelWaitForCompletion(&glI2cTxHandle, 0x7FFF);
}
/* Update the parameters */
byteAddress += glI2cPageSize;
buf_p.buffer += glI2cPageSize;
pageCount --;
/* Need a delay between write operations. */
CyU3PThreadSleep (10);
}
}
8.3 Serial Peripheral Interface
8.3.1 SPI Block Features
â–  Supports master mode only
â–  Supports all four SPI transfer modes (programmable SPI clock polarity and phase)
â–  Complies with the Motorola SPI specification in chapter 8 of the MC68HC11 reference manual
â–  Supports register-based and DMA-based transfers
â–  Supports programmable data unit length of 4 bit, 8 bit,16 bit, and 32 bit, MSB or LSB first

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