Re: [Fx2lib-devel] Sourcing slave FIFO packets
Status: Beta
Brought to you by:
mulicheng
From: Daniel O'C. <doc...@gs...> - 2011-02-26 22:24:06
|
On 27/02/2011, at 5:12, Chris McClelland wrote: > Has anyone managed to get an FX2 firmware to compose a packet from scratch > (i.e not originating from the USB host) and commit it to a slave FIFO? The > TRM seems to suggest it's only necessary to disable AUTOOUT, write the > packet to the endpoint buffer (e.g EP6FIFOBUF) and writing the packet length > to EP6BCH/EP6BCL, but I can't get it to work. See http://bit.ly/hQxIR1 for > example code (composes a packet to send to EP6's FIFO when a certain control > request is received). In my code EP1 in/out and EP6/EP8 have data sent to/from the micro directly and EP2 sends data to the PC using GPIF. I think your problem is that you set the NAK bit in the FIFO and then try and send it so I presume the PC is seeing a NAK reply from the FX2 instead of getting your data packet. -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C |