Looks like my real issue is delayed servicing of the ISR3[ADSC] interrupt (my TNT5002 code is interrupt driven). My test setup has my device setup to simply echo back messages it received, with the host sending one test msg after another. Normally, the ADSC interrupt lets me track send/receive status and I set the IN bit as needed and all works well most of the time.
My failures seem to occur when the ISR3[ADSC] interrupt is delayed long enough for the host to complete a sequence where:
> my device is currently a talker, sends the host a reply message ("IN" is clr),
> the host gets the reply message, it makes my device a listener, sends it the next message complete
> The host makes my device a talker to get the next reply message
(I am using a GPIB+ card & analyser software to verify)
Device does not get the interrupt until after these 3 events, and the "IN" flag is still cleared. At this point, I am showing ADSR as 0x4A, and ISR1[END] indicating I did get the message, but nothing is in the FIFO. I tried setting IN at this point if ISR1[END], but the FIFO is still empty (I would guess IN must be set before data from the GPIB bus can enter the FIFO).
Slowing the handshake in the GPIB+ analyser software seems to prevent the problem, allowing the interrupt to catch all ADSC events. Seems like I must be able to track talker/listener status real time to be able to set & clear the IN bit as needed for FIFO to GPIB bus transfers, as the TNT5002 will just continue GPIB data transfers regardless of the IN bit state. Is there any way around this besides disabling the FIFO and going back to using DO and DI to transfering single bytes?? Thanks!