?? readme.txt
字號:
This directory contains 8051 firmware for the Cypress Semiconductor EZ-USB FX2
REVD (and above) chip (specifically 100-pin part, but can be tested under the
DK(128-pin part)).
The purpose of this code is to demonstrate how to utilize EZUSB FX2 PORTC STROBE
FEATURE.
It configures FX2 as follows:
01). peripheral interface set to ports mode
02). EP1OUT 512 BULK OUT - PORTC STROBE WR# for writes
03). EP1IN 512 BULK IN - PORTC STROBE RD# for reads
04). CLKOUT inverted (ext.) - to assist with peripheral setup timing
05). CPUSPD = CLKOUT = 48MHz
06). PA0 pin asserts at the start of writes, logic analyzer trigger
07). PA1 pin asserts at the start of reads, logic analyzer trigger
08). turns ON debug LED3 in the event the host sends a zerolen OUT pkt.
Note: both endp1 buffers are physically limited to 64 bytes... what this means
is that the user must never send/receive more than 64 byte pkt. within a
single xfr over these specific endp's.
Warning: Some USB2.0 PDK host drivers (older) may not handle sending a zero
length OUT pkt gracefully. In one case it has the effect of rebooting the
development PC.
Warning: This firmware was written for the 100-pin part. It was tested on the
CY3681 (128-pin part). Please note that ANY xdata access via MOVX will strobe
RD#/WR# (including manipulating the DK debug LED's).
Pins to view via Logic Analyzer:
CLKOUT
PA0 - la trigger for writes
WR# - asserts for two (2) CLKOUT cycles when writting to PORTC - STROBE FEATURE
PA1 - la trigger for reads
RD# - asserts for two (2) CLKOUT cycles when reading from to PORTC - STROBE FEATURE
PORTC[7:0]
Note: CLKOUT in this example has been externally inverted. This scheme may
assist with peripheral applications that are synchronous to the rising edge
of CLKOUT...
The "portcstb.hex" file loads into internal memory.
...issue "build -i" at the command prompt...
"portcstb" pseudo code
======================
Host sends EP1OUT token
=======================
if endp "not empty event", (BUSY=0)
if pkt has data
trigger la, PA0
portc pins as outputs
xfr data out portc
else
zerolenpkt detected, turn on LED3
re-arm endp
EP1IN buffer available
=======================
if endp buffer available, (BUSY=0)
trigger la, PA1
portc pins as inputs
xfr portc data to endp buffer
commit the pkt
Note: this example constantly fills the IN endp buffer with PORTC data as the
buffer becomes available...
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -