User guide
CY3687 MoBL-USB FX2LP18 Development Kit User Guide, Doc. # 001-68582 Rev. *B 83
MoBL-USB Development Kit Firmware Examples
8.8.5 Testing the EP_Interrupts Firmware Functionality
The code example should be tested in a similar manner as Bulkloop example.The Bulk data trans-
fers on EP1 are tested with length of 64 bytes and 512 bytes for the EP2, EP4, EP6 and EP8. The
process is similar to the one outlined in section Testing the Bulkloop Firmware Functionality on
page 74.
8.9 iMemtest Firmware Example
This example does a data integrity check by writing and reading back the data on different memories
inside MoBL-USB FX2LP18 device such as GPIF waveform memory(0xE400), Endpoint buffer
memories(0xE740, 0xF000, and so on) and avoid the range where the firmware is located. If the
written data and read data match then “good” is displayed on Seven segment display-U9 and if there
are errors at any specific memory location the corresponding location is displayed. The example is
compiled using the Keil IDE similar to previous examples and corresponding images for RAM
(imemtest.hex) and EEPROM (imemtest.iic) can be generated. Both the images are located at
<Installed_directory>\<version\iMemtest. After downloading the images for RAM(iMemtest.hex) or
EEPROM(iMemtest.iic) using the process outlined in section Method to Download Firmware Image
to MoBL-USB Internal RAM Memory on page 62 observe the seven segment display for either
“GOOD” string displayed or the exact location of memory write/read failure.
8.10 Dev_IO Firmware Example
This example is used to test the connectivity of seven segment display and the Push button switches
(f2,f3) w.r.t MoBL-USB FX2LP18 device. The Seven segment display (U9) and Push buttons are
connected to Philips PCF8574 I/O expanders (U8 and U10). The example is compiled using the Keil
IDE similar to previous examples and corresponding images for RAM (Dev_IO.hex) and EEPROM
(Dev_IO.iic) can be generated. Both the images are located at <Installed_directory>\<ver-
sion\dev_io. After downloading the images using the process outlined in section Method to Down-
load Firmware Image to MoBL-USB Internal RAM Memory on page 62 and Method to Download
Firmware Image to External I2C EEPROM on page 63 press F2 push button and observe decrement
values in the range 0xF-0x0.Similarly pressing F3 will increment the values in the range 0x0-0xF
starting from the current value. Observe the Seven segment displaying the values for each button
press.
8.11 extr_intr Firmware Example
This example is used to demonstrate the use of external interrupts INT0 and INT1. The relevant
interrupt service routines (ISR) for each of these external interrupts were provided in isr.c. The fol-
lowing Table 8-3 lists the registers and associated pins for each of these interrupts:
Refer to the chapter 4 'Interrupts' in the MoBL-USB Technical Reference Manual
Table 8-3. External Interrupts and Register Definitions in MoBL-USB FX2LP18 Device
Interrupt
Interrupt
Enable
Interrupt
Pin
Priority
Control
Natural
Priority
Interrupt
Request
Flag
Interrupt Type
Interrupt type
Controlling Bit
INT0 IE.0 PA.0 IP.0 1 TCON.1
Level or Edge sen-
sitive, active low
[TCON.0]
INT1 IE.2 PA.1 IP.2 3 TCON.3
Level or Edge,
sensitive active low
[TCON.2]