This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

FX2 FIFO bulk Auto transfer mode

I am trying to write some code that will automatically load data from an 8 bit bus up to the computer through USB. I have started writing the code but my FX2 chips aren't in yet so I was wondering if anyone could take a look and tell me if it looks ok. I set the EPxCFG for bulk transfer, quad buffer, and enabled the endpoint. Then I set the EPxFIFOCFG for Autoin and to send zero length messages. I set IFCONFIG for Slave FIFO interface, synchronous mode, and internal clock. I'm not sure if there's anything else I'm going to have to set to do an AUTO-IN transfer.
Thanks in advance for your help
Here's my little piece of code:

#define ALLOCATE_EXTERN
#include "fx2.h"
#include "fx2regs.h"

main()
{
// ENDPOINT SETUP
// Set endpoint valid
// Set endpoint direction
// Set endpoint type
// Set endpoint size
// Set endpoint buffer size
EP6CFG = 0xE9; // 11101000

// FIFO CONFIGURATION
// Set autoin
// Set zero length packets
// Set 8 or 16 bits
EP6FIFOCFG = 0x0C; // 00001100

//set all other endpoints to be size of 8bits too
EP2FIFOCFG = 0x00;
EP4FIFOCFG = 0x00;
EP8FIFOCFG = 0x00;

// EXTERNAL MASTER CONFIGURATION
// Set Port B to be FIFO Data bus
// Set Async/Sync operation
// Set FIFO Clock Internal/External
// Set Control pin polarity
IFCONFIG = 0x23; // 00100011

// Set SOF interrupt
USBIE = bmBIT1;
}