From: Jan Michel Date: Wed, 2 Oct 2013 13:49:02 +0000 (+0200) Subject: updated padiwa.pl with new features, fixed onewire reset X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=168ec3fd7f7b491cc8ffda7d32841ce7addb3125;p=daqtools.git updated padiwa.pl with new features, fixed onewire reset --- diff --git a/tools/padiwa.pl b/tools/padiwa.pl index e3d5791..11c3c42 100755 --- a/tools/padiwa.pl +++ b/tools/padiwa.pl @@ -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); + } + } +