]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
add register set for UART
authorJan Michel <michel@physik.uni-frankfurt.de>
Mon, 5 Dec 2022 16:00:16 +0000 (17:00 +0100)
committerJan Michel <michel@physik.uni-frankfurt.de>
Mon, 5 Dec 2022 16:00:16 +0000 (17:00 +0100)
web/htdocs/network/tools.pl
xml-db/database/UART.xml [new file with mode: 0644]

index ea95ac5c399e151ff21b84bb5f0115e1efb0ab01..04e39e193a0fbc7c1b11684d2ae175ee6d576565 100755 (executable)
@@ -19,7 +19,7 @@ use xmlpage;
 
 my $page;
 
-$page->{title} = "Triggerbox Register";
+$page->{title} = "Tools (SPI, I2C, ADC, UART)";
 $page->{link}  = "../";
 
 my @setup;
@@ -45,10 +45,15 @@ push(@setup,({name      => "SPI",
               rates     => 1,
               address   => 1}));                
 
+push(@setup,({name      => "UART", 
+              cmd       => "UART-0xffff-UARTRegisters",
+              period    => 1000,
+              rates     => 1,
+              address   => 1}));                
+              
 xmlpage::initPage(\@setup,$page);
  
 
 
 1;
 
diff --git a/xml-db/database/UART.xml b/xml-db/database/UART.xml
new file mode 100644 (file)
index 0000000..e09eff0
--- /dev/null
@@ -0,0 +1,38 @@
+<?xml version="1.0"  encoding="utf-8" ?>
+<TrbNetEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:noNamespaceSchemaLocation="../schema/TrbNetEntity.xsd"
+              name="UART"
+              address="d600"
+              >
+  <description> UART Controller </description>
+  <group name="UARTRegisters" address="0000" purpose="config" mode="rw" >
+    
+
+    
+    <register name="ClockDiv" address="0001"  >
+        <description>Clock Divider based on main system clock</description>
+        <field name="ClockDiv" start="0" bits="16" format="unsigned"  />
+    </register>
+    
+    <register name="OutputSelect" address="0002"  >
+        <description>Select one of the possible I/O pin pairs</description>
+        <field name="OutputSelect" start="0" bits="4" format="hex"  />
+    </register>    
+
+    <register name="Data" address="0000" mode="w" >
+        <description>Data to be sent. Written to a 2k memory. Reading reads received data from Fifo</description>
+        <field name="Data" start="0" bits="8" format="hex"  />
+    </register>
+    
+    <register name="Status" address="0003" mode="r" >
+        <description>Status register</description>
+        <field name="RxFull"    start="0" bits="1" format="boolean" errorflag="true" ><description>RX Fifo full</description></field>
+        <field name="RxEmpty"   start="1" bits="1" format="boolean" ><description>RX Fifo empty</description></field>
+        <field name="TxFull"    start="2" bits="1" format="boolean" errorflag="true" ><description>TX Fifo full</description></field>
+        <field name="TxEmpty"   start="3" bits="1" format="boolean" ><description>TX Fifo empty</description></field>
+        <field name="RxDebug"   start="4" bits="4" format="hex" ><description>RX Debug Flags</description></field>
+        <field name="TxDebug"   start="8" bits="4" format="hex" ><description>TX Debug Flags</description></field>
+    </register>     
+    
+    </group>  
+</TrbNetEntity>