h1. AHBUARTplugin p=. !{width: 80%}AHBUARTPluginWLegend.png(AHBUart plugin screenshot example)! h2. General Description The AHBUARTplugin is a root plugin which allows you to connect to any "SOC":https://en.wikipedia.org/wiki/System_on_a_chip using "gaisler's AHBUART":http://www.gaisler.com/products/grlib/grip.pdf IP. The plugin is capable of scanning available serial port on the computer and measuring system clock if a DSU3 IP is also present. Before any transaction it will check if the device is still connected by reading at 0x80000000. h2. Python's specific features [[Plugins_Python_API|Common methods]] Methods list: * %{color:green}bool% *[[AHBUARTplugin#open|open]]* (%{color:green}QString% PortName, %{color:green}int% baudrate); * %{color:blue}void% *[[AHBUARTplugin#close|close]]* (); * %{color:blue}void% *[[AHBUARTplugin#updatePortList|updatePortList]]* (); * %{color:green}int% *[[AHBUARTplugin#detectSpeed|detectSpeed]]* (); ---- ---- h2(#open). %{color:green}bool% *[[AHBUARTplugin#open|open]]* (%{color:green}QString% PortName, %{color:green}int% baudrate) Opens given *PortName* with given *baudrate* and returns %{color:blue}true% if success. On Windows PortName is COMx where x is the port number. On Linux PortName may be "/dev/ttySx" if you are using an integrated COM port or "/dev/ttyUSBx" if you are using an USB to RS232 converter. In both case x is the port number. *Example:* Here we will connect to target through /dev/ttyUSB0 at 3Mbaud and print success if we succeed.

proxy.loadSysDriver("AHBUARTplugin","AHBUARTplugin0")
if AHBUARTplugin0.open("/dev/ttyUSB0",3000000):
  print "success"
else:
  print "failed"
---- h2(#close). %{color:blue}void% *[[AHBUARTplugin#close|close]]* () Closes current port and tells child plugins that it is disconnected. If already disconnected, does nothing. ---- h2(#updatePortList). %{color:blue}void% *[[AHBUARTplugin#updatePortList|updatePortList]]* () Search for available serial port on the computer. This method isn't much useful in the python terminal since the list of serial ports will be used only for completion on the GUI. ---- h2(#detectSpeed). %{color:green}int% *[[AHBUARTplugin#detectSpeed|detectSpeed]]* () Returns the system clock. This method will only work if a DSU3 IP is present on the soc and the timetag counter is counting. ----