Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Data loss in TNT 4882

Hi
 i am developing a USB - GPIB converter using TNT 4882. While sending & receiving data trou tnt 4882, i am loosing 4 / 12 bytes of data for every 65536 bytes transmitted or received.i couldnt figure out what is creating the data loss. here is the code which receives data from a cypress USB chip.
   i am using DMA mode of transfer
 
         IOA = (R_fifob << 1) | 0x40;   // initialize other pins CS, ADDR, ABUS, BBUS,
         if( GPIFTRIG & 0x80 )               // if GPIF interface IDLE
         {
        if((GPIFREADYSTAT & 0x02) != 0)   //  check  for DRQ FIFO not full
  {
            SYNCDELAY;   
            GPIFTCB1 = (char) (cnt >> 8);     // setup transaction count
            SYNCDELAY;
            GPIFTCB0 = (char) (cnt);
            SYNCDELAY;
            USB_Rec_Bytes += cnt;
            EP2BCL = 0;     // manual commit
            SYNCDELAY;
          GPIFTRIG = GPIF_EP2;              // launch GPIF FIFO Write Transaction from EP2 FIFO
       SYNCDELAY;
       while( !( GPIFTRIG & 0x80 ) )     // poll GPIFTRIG.7 GPIF Done bit
          {
            if(Interrupt_Occured)
            {
               GPIFABORT = 0xFF;
               Interrupt_Occured = FALSE;
            }
          }
          SYNCDELAY;
         }
        }
}
 
can any one expalin what is going wrong & the possible solutions.
 
With Thanx & regards
Sreedhar
 
0 Kudos
Message 1 of 2
(3,242 Views)
Have you investigated the GPIB-USB-HS as a potential solution to the problem you're trying to solve by designing your own USB converter?  It could save you a lot of time in firmware design, troubleshooting, and manufacturing.
 
Scott B.
GPIB Software
National Instruments
0 Kudos
Message 2 of 2
(3,217 Views)