Programming the Board
Reset
(c) Spectrum GmbH
63
Driver version
This register holds information about the currently installed driver library. As the drivers are permanently improved and maintained and new
features are added user programs that rely on a new feature are requested to check the driver version whether this feature is installed.
The resulting 32 bit value for the driver version consists of the three version number parts shown in the table below:
Kernel Driver version
This register informs about the actually used kernel driver. Windows users can also get this information from the device manager. Please refer
to the „Driver Installation“ chapter. On Linux systems this information is also shown in the kernel message log at driver start time.
The resulting 32 bit value for the driver version consists of the three version number parts shown in the table below:
The following example demonstrates how to read out the kernel and library version and how to print them.
This small program will generate an output like this:
Reset
Every Spectrum card can be reset by software. Concerning the hardware, this reset is the same as the power-on reset when starting the host
computer. In addition to the power-on reset, the reset command also brings all internal driver settings to a defined default state. A software
reset is automatically performed, when the driver is first loaded after starting the host system.
It is recommended, that every custom written program performs a software reset first, to be sure that the
driver is in a defined state independent from possible previous setting.
Performing a board reset can be easily done by the related board command mentioned in the following table.
DRVTYP_WOW64
6
Windows WDM 64bit driver is used by 32bit application (XP64/Vista/Windows 7/Windows 8/ Windows 10).
DRVTYP_LINUX64
7
Linux 64bit driver is used
Register
Value
Direction
Description
SPC_GETDRVVERSION
1200
read
Gives information about the driver library version
Driver Major Version
Driver Minor Version
Driver Build
8 Bit wide: bit 24 to bit 31
8 Bit wide, bit 16 to bit 23
16 Bit wide, bit 0 to bit 15
Register
Value
Direction
Description
SPC_GETKERNELVERSION
1210
read
Gives information about the kernel driver version.
Driver Major Version
Driver Minor Version
Driver Build
8 Bit wide: bit 24 to bit 31
8 Bit wide, bit 16 to bit 23
16 Bit wide, bit 0 to bit 15
spcm_dwGetParam_i32 (hDrv, SPC_GETDRVVERSION, &lLibVersion);
spcm_dwGetParam_i32 (hDrv, SPC_GETKERNELVERSION, &lKernelVersion);
printf("Kernel V %d.%d build %d\n”,lKernelVersion >> 24, (lKernelVersion >> 16) & 0xff, lKernelVersion & 0xffff);
printf("Library V %d.%d build %d\n”,lLibVersion >> 24, (lLibVersion >> 16) & 0xff, lLibVersion & 0xffff);
Kernel V 1.11 build 817
Library V 1.1 build 854
Register
Value
Direction
Description
SPC_M2CMD
100
w
Command register of the board.
M2CMD_CARD_RESET
1h
A software and hardware reset is done for the board. All settings are set to the default values. The data in the board’s
on-board memory will be no longer valid. Any output signals like trigger or clock output will be disabled.