Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
This Document is not yet Rated  Rate this Document

Losing a Byte during a Read when Using the TNT4882 ESP Code

Hardware: GPIB

Problem: Using the ESP code for the TNT4882TL beta 1.0 there is a problem with the algorithm for the Setup_TNT_IO routine which is located in the GPIB_IO.C source file. Specifically, at the point where the chip is started the GO (TNT_Out(R_cmdr, F_go);) command may move the chip into the RFD (Ready for Data) state (if for instance we are waiting to go into the RFD state only because the HALTsignal is asserted, since GO clears HALT, we would go into RFD). The next line in the code (TNT_Out(R_auxmr,F_rhdf);) asserts the rhdf signal for some short period of time (it is normally used to clear the ANHS1 bit which is another reason we may be waiting to go into the RFD state). However, while we are asserting rhdf that moves us back out of the RFD state. If during that time the talker asserts DAV we then will accept the byte but that byte will not be placed in the FIFO (i.e. we will never see it.)

This problem has been seen on fairly slow machines (25Mhz) running VXWorks and using the queueing method described in the ESP code. The queueing method calls for the use of the HALT signal which leaves us open for the occurrence listed above.

Solution: The solution is to reverse the order of the two lines of code listed above so that the code reads:
TNT_Out(R_auxmr,F_rhdf); /* Release holdoff */
TNT_Out(R_cmdr, F_go); /* Start transfer state machine */


Related Links:

Attachments:





Report Date: 04/01/1997
Last Updated: 06/11/2004
Document ID: 0W0GDRVD

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit