# AHBUARTplugin¶

## General Description¶

The AHBUARTplugin is a root plugin which allows you to connect to any SOC using gaisler's AHBUART 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.

Common methods

Methods list:

## boolopen (QString PortName, int baudrate)¶

Opens given PortName with given baudrate and returns 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"


## voidclose ()¶

Closes current port and tells child plugins that it is disconnected. If already disconnected, does nothing.

## voidupdatePortList ()¶

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.

## intdetectSpeed ()¶

Returns the system clock. This method will only work if a DSU3 IP is present on the soc and the timetag counter is counting.

Also available in: PDF HTML TXT