Dobrica Pavlinušić's random unstructured stuff
FX2LP: Revision 4
CY7C68013A.jpg



Cypress CY7C68013A EZ-USB FX2LP

U2CY7C68013-56.pdf

1. With CY7C68013A-56 chip: low-power version of the enhanced 51-core, 16KBprogram data areas, frequency of 48Mhz, 480Mbps high-speed transmission protocol standards, compatible with USB2.0

2. Firmware, EEPROM: Complete in-system programming solution with a USB cabledirectly to download firmware, on-board to provide 16K (24LC128) a large program memory (EEPROM), used as storage VID / PID and the USB firmware, the program space to meet the CY7C68013A Needs.

3. All the GPIO pin through the 2.54mm standard leads to very convenient for learners toexpand DIYdesign.

4. With the board firmware can be achieved through the core function of the logic analyzer

5. PDF format, provide the schematic and code

dpavlin@blue:/bluez/CY7C68013A$ lsusb -d 04b4:8613
Bus 003 Device 023: ID 04b4:8613 Cypress Semiconductor Corp. CY7C68013 EZ-USB FX2 USB 2.0 Development Kit

Be sure to disable any udev rules which try to load firmware for other devices with FX2

Altera USBBlaster clone

pull-up TMS, TDI, pull-down TCK

Altera recommends that you use pull-up resistor values between 1k and 10k ohms on the TMS and TDI pins and a pull-down resistor valueof 1k ohmson the TCK pin.

dpavlin@blue:/bluez/CY7C68013A/USB-Blaster/fx2fw-sdcc$ make
asx8051 -plosgff vectors.a51
make: asx8051: Command not found
Makefile:42: recipe for target 'vectors.rel' failed
make: *** [vectors.rel] Error 127

dpavlin@blue:/bluez/CY7C68013A/USB-Blaster/fx2fw-sdcc$ dpkg -l sdcc
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                    Version          Architecture     Description
+++-=======================-================-================-====================================================
ii  sdcc                    3.4.0+dfsg-2     amd64            Small Device C Compiler



Loading firmware

Aug 17 17:38:26 blue kernel: [13787.802348] usb 3-1.6.4.4: new high-speed USB device number 26 using ehci-pci
Aug 17 17:38:26 blue kernel: [13787.894557] usb 3-1.6.4.4: New USB device found, idVendor=04b4, idProduct=8613
Aug 17 17:38:26 blue kernel: [13787.894563] usb 3-1.6.4.4: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Aug 17 17:38:26 blue kernel: [13787.894945] usbtest 3-1.6.4.4:1.0: FX2 device
Aug 17 17:38:26 blue kernel: [13787.894950] usbtest 3-1.6.4.4:1.0: high-speed {control bulk-in bulk-out} tests (+alt)

root@blue:/bluez/CY7C68013A/USB-Blaster/fx2fw-sdcc# DEVICE=/dev/bus/usb/003/026 /sbin/fxload -t fx2lp -I usbjtag.hex -v 
microcontroller type: fx2lp
single stage:  load on-chip memory
open RAM hexfile image usbjtag.hex
stop CPU
write on-chip, addr 0x0000 len    6 (0x0006)
write on-chip, addr 0x000b len    3 (0x0003)
write on-chip, addr 0x0013 len    3 (0x0003)
write on-chip, addr 0x001b len    3 (0x0003)
write on-chip, addr 0x0023 len    3 (0x0003)
write on-chip, addr 0x002b len    3 (0x0003)
write on-chip, addr 0x0033 len    3 (0x0003)
write on-chip, addr 0x003b len    3 (0x0003)
write on-chip, addr 0x0043 len    3 (0x0003)
write on-chip, addr 0x004b len    3 (0x0003)
write on-chip, addr 0x0053 len    3 (0x0003)
write on-chip, addr 0x005b len    3 (0x0003)
write on-chip, addr 0x0063 len    3 (0x0003)
write on-chip, addr 0x006b len    1 (0x0001)
write on-chip, addr 0x0080 len   56 (0x0038)
write on-chip, addr 0x0100 len  128 (0x0080)
write on-chip, addr 0x0fa0 len    3 (0x0003)
write on-chip, addr 0x0fb9 len    3 (0x0003)
write on-chip, addr 0x0fa3 len    3 (0x0003)
write on-chip, addr 0x0180 len 1008 (0x03f0)
write on-chip, addr 0x0570 len   77 (0x004d)
write on-chip, addr 0x0fbc len    6 (0x0006)
write on-chip, addr 0xe100 len   83 (0x0053)
write on-chip, addr 0xe154 len  150 (0x0096)
write on-chip, addr 0x05bd len  452 (0x01c4)
write on-chip, addr 0x0f98 len    2 (0x0002)
write on-chip, addr 0x0781 len  440 (0x01b8)
write on-chip, addr 0x0fb3 len    6 (0x0006)
write on-chip, addr 0x0f9a len    6 (0x0006)
write on-chip, addr 0x0939 len 1008 (0x03f0)
write on-chip, addr 0x0d29 len  595 (0x0253)
write on-chip, addr 0x0fa6 len   13 (0x000d)
write on-chip, addr 0x0f7c len   28 (0x001c)
... WROTE: 4110 bytes, 33 segments, avg 124
reset CPU
root@blue:/bluez/CY7C68013A/USB-Blaster/fx2fw-sdcc# 

Aug 17 17:41:23 blue kernel: [13964.652392] usb 3-1.6.4.4: USB disconnect, device number 26
Aug 17 17:41:24 blue kernel: [13965.107683] usb 3-1.6.4.4: new high-speed USB device number 27 using ehci-pci
Aug 17 17:41:24 blue kernel: [13965.199976] usb 3-1.6.4.4: config 1 interface 0 altsetting 0 bulk endpoint 0x81 has invalid maxpacket 64
Aug 17 17:41:24 blue kernel: [13965.199981] usb 3-1.6.4.4: config 1 interface 0 altsetting 0 bulk endpoint 0x2 has invalid maxpacket 64
Aug 17 17:41:24 blue kernel: [13965.201001] usb 3-1.6.4.4: New USB device found, idVendor=09fb, idProduct=6001
Aug 17 17:41:24 blue kernel: [13965.201005] usb 3-1.6.4.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Aug 17 17:41:24 blue kernel: [13965.201008] usb 3-1.6.4.4: Product: USB-Blaster
Aug 17 17:41:24 blue kernel: [13965.201009] usb 3-1.6.4.4: Manufacturer: EPFL
Aug 17 17:41:24 blue kernel: [13965.201011] usb 3-1.6.4.4: SerialNumber: 00000000


FX2 lib

libfx2loader

dpavlin@blue:/bluez/CY7C68013A$ wget http://www.swaton.ukfsn.org/bin/makestuff-lindar-20130719.tar.gz

dpavlin@blue:/bluez/CY7C68013A$ tar xvf makestuff-lindar-20130719.tar.gz

dpavlin@blue:/bluez/CY7C68013A$ cd makestuff/libs/

dpavlin@blue:/bluez/CY7C68013A/makestuff/libs$ ../scripts/msgit.sh makestuff/libfx2loader
Cloning into 'libfx2loader'...
remote: Counting objects: 174, done.
remote: Total 174 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (174/174), 58.68 KiB | 0 bytes/s, done.
Resolving deltas: 100% (112/112), done.
Checking connectivity... done.

dpavlin@blue:/bluez/CY7C68013A/makestuff/3rd$ ln -s ../../fx2lib/

dpavlin@blue:/bluez/CY7C68013A/makestuff/libs$ cd libfx2loader/