User guide
CY3687 MoBL-USB FX2LP18 Development Kit User Guide, Doc. # 001-68582 Rev. *B 73
MoBL-USB Development Kit Firmware Examples
the host. Endpoint 6 has to be 'committed', that is, make the FIFO buffers available to the host for
reading data from endpoint 6.
After the data is transferred, endpoint 2 has to be 'rearmed' to accept a new packet from the host.
Endpoint 6 has to be 'committed', that is, make the FIFO buffers available to the host for reading
data from endpoint 6.
This is accomplished by the following statements:
EP6BCH = EP2BCH;
SYNCDELAY;
EP6BCL = EP2BCL; // commit EP6IN by specifying the number of bytes the
host can read //from EP6
SYNCDELAY;
EP2BCL = 0x80; // re (arm) EP2OUT
The same operation is carried out to implement a data loop with endpoints 4 and 8.
8.5.2 Building Bulkloop Firmware Example Code for MoBL-USB FX2LP18 Internal and
EEPROM
■ Click on Build Target button at the top right corner of the IDE. Following snapshot of the Build
window of the Keil IDE shows the successful compilation of the entire project.
Figure 8-5. Output Window Snapshot of Bulkloop Project Build
Note: Observe in the above Figure 8-5 the total Code bytes of Bulkloop project is less than the 4k
code limit Keil uVision2 IDE provided along with the kit.
■ Firmware output for MoBL-USB FX2LP18 RAM memory: The output of the Build Target is
bulkloop.hex relevant for downloading to MoBL-USB FX2LP18 RAM memory.
■ Firmware output for external EEPROM: To generate EEPROM compatible firmware Image the
Keil IDE invokes hex2bix.exe utility to convert the output file bulkloop.hex into bulkloop.iic.
Right click on Target1 in Project Window and select Options for Target 'Target1'.This will pop-up
keil settings for this project. Select Output tab and observe at the bottom of IDE the hex2bix utility
is invoked under Run User program#1 section and observe the hex2bix utility is invoked in the
following manner
..\..\Bin\hex2bix -i -c 0x00 -f 0xC2 -o bulkloop.iic bulkloop.hex
Refer to application note, “Using the hex2bix Conversion Utility - AN45197” to know more details on
the hex2bix utility.
8.5.3 Method to Download Bulkloop Firmware Image to Internal RAM or EEPROM
Refer to section Method to Download Firmware Image to MoBL-USB Internal RAM Memory on
page 62 and Method to Download Firmware Image to External I2C EEPROM on page 63 and follow