User guide
CY3687 MoBL-USB FX2LP18 Development Kit User Guide, Doc. # 001-68582 Rev. *B 85
MoBL-USB Development Kit Firmware Examples
Located at <Installed_directory>\<version\Firmware/vend_ax and observe vendor commands imple-
mented in the C routine - DR_VendorCmnd (void) .Following are the vendor commands defined in
"vend_ax.c" file:
The example is compiled using the Keil IDE similar to previous examples and corresponding images
for RAM (vend_ax.hex) and EEPROM (vend_ax.iic) can be generated. Both the images are located
at <Installed_directory>\<version>\vend_ax.Using CyConsole/CyControlCenter the images can be
downloaded as outlined in 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.
8.12.1 Testing the vend_ax Example
1. 0xA2 command-Read/Write to EEPROM
As mentioned in table this command is used to read and write contents to small EEPROM. Short
pins 2-3 of JP7 to enable Writes to small EEPROM-U8.Before Writing to EEPROM using 0xA2
command set SW2-LG-SM and SW1-SMALL EEPROM..
a. Test using CyConsole
To read the contents of small EEPROM select Req=0xA2 wValue=0 wIndex=0 Length = 24 bytes
(data to read) and direction IN for reading the data on control endpoint. Click on Vend Req. Fol-
lowing figure summarizes the entire operation
Figure 8-10. A2 Vendor Command Read Operation using Cyconsole
Observe the contents read from the small EEPROM
To write the contents to small EEPROM select Req=0xA2 wValue=0 wIndex=0 Length = 24 bytes
(data to read) and direction OUT for sending data on control endpoint. The small EEPROM con-
Table 8-4. Vendor Command Definitions in vend_ax Example
S.No
Vendor Command/Macro
Definition
Function
1 0xA2/VR_EEPROM Downloads data to a small EEPROM
2 0xA3/ VR_RAM Downloads data to internal RAM memory
3
0xA6/
VR_GET_CHIP_REV
The command retrieves the current revision of MOBL-USB FX2LP18 IC
4 0xA8/VR_RENUM The MoBL-USB FX2LP18 device disconnects and re-connect again.
5 0xA9/VR_DB_FX
The Commands selects double byte addressed large EEPROM-U7 and
the contents can be uploaded or downloaded to EEPROM
6 0xAA/VR_I2C_100 Sets the I2C interface to 100 kHz
7 0xAB/VR_I2C_400 Sets the I2C interface to 400 kHz