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.
Python's specific features¶
- bool open (QString PortName, int baudrate);
- void close ();
- void updatePortList ();
- int detectSpeed ();
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.
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"
Closes current port and tells child plugins that it is disconnected. If already disconnected, does nothing.
void 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.
int 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.