Powerdown and reset | Programming the Board |
|
|
Example program for the board initialization
The following example is only an exerpt to give you an idea on how easy it is to initialize a Spectrum board.
//
if (SpcInitPCIBoards (&nCount, &nPCIBusVersion) != ERR_OK) return;
if (nCount == 0)
{
printf ("No Spectrum board found\n"); return;
}
// | request and print Board type and some information | |||
SpcGetParam (hDrv, SPC_PCITYP, | &lBrdType); | |||
SpcGetParam | (hDrv, | SPC_PCIMEMSIZE, | &lInstMemsize); | |
SpcGetParam | (hDrv, | SPC_PCISERIALNO, | &lSerialNumber); |
//
switch (lBrdType & TYP_SERIESMASK)
{
case TYP_MISERIES:
printf ("Board found: | MI.%x sn: %05d\n", lBrdType & 0xffff, lSerialNumber); |
break; |
|
case TYP_MCSERIES: | MC.%x sn: %05d\n", lBrdType & 0xffff, lSerialNumber); |
printf ("Board found: | |
break; |
|
case TYP_MXSERIES: | MX.%x sn: %05d\n", lBrdType & 0xffff, lSerialNumber); |
printf ("Board found: | |
break; |
|
} |
|
printf ("Memory on board: %ld MBytes (%ld MSamples)\n", lInstMemsize /1024/1024, lInstMemsize /1024/1024 /2);
printf ("Serial Number: %05ld\n", lSerialNumber);
Powerdown and reset
Every Spectrum board can be set to powerdown mode by software. In this mode the board is therefore consuming less power than in normal operation mode. The amount of saved power is board dependant. Please refer to the technical data section for details. The board can be set to normal mode again either by performing a reset as mentioned below or by starting the board as described in the according chapters later in this manual.
If the board is set to powerdown mode or a reset is performed the data in the
Performing a board reset or powering down the board can be easily done by the related board commands mentioned in the following table.
Register | Value | Direction | Description | |
SPC_COMMAND | 0 | r/w | Command register of the board. | |
| SPC_POWERDOWN | 30 | Sets the board to powerdown mode. The data in the | |
|
|
| replayed again. The board can be set to normal mode again by the reset command or by starting the boards. | |
| SPC_RESET | 0 | A software and hardware reset is done for the board. All settings are set to the default values. The data in the board’s | |
|
|
|
40 | MC.31xx Manual |