Re: Agilent 82357B repeatable hard failure
dave penkler <[email protected]> Mon, 2 Oct 2023 14:31:48 +0200
| Newsgroups | gmane.linux.hardware.gpib.general |
|---|---|
| Message-ID | <CAL=kjP15-wuQW761wHEayjD7fafRz_0VF5_3PMr8q8mqt-vDEA@mail.gmail.com> |
Hi Jim, I refactored the take control function to avoid reading the status and checking ATN when called from read. See the attached patch. Would this work for you ? -Dave On Sun, 1 Oct 2023 at 14:48, Jim Houston <[email protected]> wrote: > Hi Dave, Everyone, > > The loop reading the status and checking for ATN in > agilent_82357a_take_control > was helpful in finding the problems with the ADSR but maybe it isn't > needed anymore. > I did a couple tests. I tried setting timeout to 1 to check that ATN is > there on the first read. > Then I took out the loop and the timeout check. I ran the > hp3478_read_calibration script > in a loop for a few minutes. It works. > > I checked the times for a hp3478_read_calibration run and removing the > check > for the ATN reduced the time from 7.6 seconds to 7.3 seconds. > > JIm > > > _______________________________________________ Linux-gpib-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-gpib-general
agilent_82357a.patch
(text/x-patch, 1.8 KB)
Index: drivers/gpib/agilent_82357a/agilent_82357a.c
===================================================================
--- drivers/gpib/agilent_82357a/agilent_82357a.c (revision 2063)
+++ drivers/gpib/agilent_82357a/agilent_82357a.c (working copy)
@@ -34,7 +34,7 @@
unsigned int agilent_82357a_update_status( gpib_board_t *board, unsigned int clear_mask );
-int agilent_82357a_take_control(gpib_board_t *board, int synchronous);
+int agilent_82357a_take_control_internal(gpib_board_t *board, int synchronous);
static void agilent_82357a_bulk_complete(struct urb *urb PT_REGS_ARG)
{
@@ -577,7 +577,7 @@
/* Fix for a bug in 9914A that does not return the contents of ADSR
when the board is in listener active state and ATN is not asserted.
Set ATN here to obtain a valid board level ibsta */
- agilent_82357a_take_control(board,0);
+ agilent_82357a_take_control_internal(board,0);
//FIXME check trailing flags for error
return retval;
@@ -737,13 +737,11 @@
return agilent_82357a_generic_write(board, buffer, length, 1, 0, bytes_written);
}
-int agilent_82357a_take_control(gpib_board_t *board, int synchronous)
+int agilent_82357a_take_control_internal(gpib_board_t *board, int synchronous)
{
agilent_82357a_private_t *a_priv = board->private_data;
- const int timeout = 10;
struct agilent_82357a_register_pairlet write;
int retval;
- int i;
/* It looks like the 9914 does not handle tcs properly.
See comment above tms9914_take_control_workaround() in
@@ -762,6 +760,14 @@
{
printk("%s: agilent_82357a_write_registers() returned error\n", __FUNCTION__);
}
+ return retval;
+}
+int agilent_82357a_take_control(gpib_board_t *board, int synchronous)
+{
+ const int timeout = 10;
+ int i;
+
+ agilent_82357a_take_control_internal( board, synchronous );
// busy wait until ATN is asserted
for(i = 0; i < timeout; ++i)
{