EZ-USB Development Kit User Guide, Doc. # 001-66390 Rev. *D 87
EZ-USB Development Kit Firmware Examples
AUTOPTRL2 = 0x00;
count = (EP2BCH << 8) + EP2BCL;
for( i = 0x0000; i < count; i++ )
{
EXTAUTODAT2 = EXTAUTODAT1;
}
// Source is external RAM
APTR1H = 0x28;
APTR1L = 0x00;
// Destination is EP6IN
AUTOPTRH2 = MSB( &EP6FIFOBUF );
AUTOPTRL2 = LSB( &EP6FIFOBUF );
count = (EP2BCH << 8) + EP2BCL;
for( i = 0x0000; i < count; i++ )
{
EXTAUTODAT2 = EXTAUTODAT1;
}
EP6BCH = EP2BCH;
SYNCDELAY;
EP6BCL = EP2BCL; // arm EP6IN
SYNCDELAY;
EP2BCL = 0x80; // re(arm) EP2OUT
}
}
Similarly, endpoint EP4 destination and the EP8 source buffer is commonly defined as the external
RAM memory-0x2A00.
Note For EZ-USB FX1, the above steps can be repeated with a data transfer length of 64 bytes
instead of 512 bytes.
8.7.2 Building Bulkext fIrmware Example Code for EZ-USB RAM Memory and EEPROM
Click on the Build Target button at the top right corner of the IDE. The total code bytes of the
Bulkext firmware example is less than the 4-k code limit Keil µVision2 IDE, provided along with the
kit. The output of the Build Target is the bulkext.hex and bulkext.iic files.
8.7.3 Method to Download Firmware Image to EZ-USB Internal RAM and EEPROM
Refer to Method to Download Firmware Image to EZ-USB Internal RAM Memory on page 69 and fol-
low a similar procedure to download bulkext.hex to the RAM memory and bulkext.iic to Large
EEPROM using Cyconsole/CyControlCenter. The bulkext.hex and bulkext.iic files are located
at <Installed_directory>\<Version>\Firmware\Bulkext. After downloading, the firm-
ware re-enumerates with the PC using its internal VID/PID-0x04B4/0x1004.