Problems Writing Short Packets

Version 1
    Question: I've already been able to do a bulk IN transfer using the FX processor as an external master (which will be eventually replaced by a DSP), but I still have the following problem: I'm trying to write a short byte array to EP6 (less than 512, which is the default). I'm using the register version of the PKTEND signal (e.g. writeregister(0x20, 0x04)), but it does not seem to commit the FIFO content to USB. How should this be done? I have successfully received data using the EZ-USB Control Panel writing 512 bytes to EP6 (from the perpheral), and doing a bulk read with length=512. Changing the bulk read length to anything else makes the communication fail.



    Page 22 of the SX2 datasheet notes, "By writing the desired endpoint number (2,4,6, or 8), SX2 logic automatically commits an IN buffer to the USB host." So, you should perform the operation write register (0x20, 0x06)) instead of 0x04.