]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
updated padiwa.pl with new features, fixed onewire reset
authorJan Michel <j.michel@gsi.de>
Wed, 2 Oct 2013 13:49:02 +0000 (15:49 +0200)
committerJan Michel <j.michel@gsi.de>
Wed, 2 Oct 2013 13:49:02 +0000 (15:49 +0200)
tools/padiwa.pl

index e3d5791b25a4dea71098e387af3780c9e5785248..11c3c42f08dd52b791e48b6605f29210e91201a7 100755 (executable)
@@ -41,7 +41,7 @@ if(!(defined $ARGV[0]) || !(defined $ARGV[1]) || !(defined $ARGV[2])) {
   print "\t enablecfg\t enable or disable access to configuration flash, options: 1/0\n";
   print "\t dumpcfg \t Dump content of configuration flash. Pipe output to file\n";
   print "\t writecfg \t Write content of configuration flash. options: \$filename\n";
-  
+  print "\t fifo \t\t Read a byte from the test fifo (if present, no options\n";  
   exit;
   }
 my $board, my $value, my $mask;
@@ -93,7 +93,7 @@ if($ARGV[2] eq "temp") {
 if($ARGV[2] eq "resettemp") {
   sendcmd(0x10800001);
   usleep(100000);
-  sendcmd(0x10800001);
+  sendcmd(0x10800000);
   }
 
   
@@ -272,4 +272,12 @@ if($ARGV[2] eq "writecfg" && defined $ARGV[3]) {
     $p++;
     printf(STDERR "\r%d / 5760",$p) if(!($p%10)); 
     }
-  }  
\ No newline at end of file
+  }  
+
+if($ARGV[2] eq "fifo" || $ARGV[2] eq "ffarr") {
+  my $b = sendcmd(0x200a0000);
+  foreach my $e (sort keys %$b) {
+    printf("0x%04x\t%d\t0x%04x\n",$e,$chain,$b->{$e}&0xffff);
+    }
+  }    
+