Download PowerDNA API Reference Manual

Transcript
PowerDNA API Reference Manual, Release 4.0
established
DQ_SEND_ERROR
unable to send the Command to IOM
DQ_TIMEOUT_ERROR
nothing is heard from the IOM for Time out duration
DQ_SUCCESS
if the Command is processed successfully
Other negative values
low level IOM error
Description:
The function switches IOM layers between operation, configuration, shutdown, and other
modes. The valid Mode settings are:
#define
#define
#define
#define
DQ_IOMODE_INIT
DQ_IOMODE_CFG
DQ_IOMODE_OPS
DQ_IOMODE_SD
1L
2L
4L
8L
// Power management modes
#define DQ_IOMODE_SLEEP
0x10
#define DQ_IOMODE_PWRDN
0x20
#define DQ_IOMODE_PWRUP
0x40
//
//
//
//
device
device
device
device
is
in
in
in
being initialized
configuration mode
operation mode
shutdown mode
// sleep mode
// power down device
// switch device power on
// The following extended modes are intended for multi-master IOMs
#define DQ_IOMODE_GETCTRBUS 0x100
// become a master on the bus
#define DQ_IOMODE_GIVEUPBUS 0x200
// become a slave on the bus
Current implementation of IOM does not have power-management modes.
When the PowerDNA cube is powered-up and configuration is set to normal, it loads firmware,
and goes into initialization mode. In initialization mode, it sets all output to pre-defined values and
initializes hardware and software. The PowerDNA cube then automatically switches all layers into
configuration mode. In configuration mode, data acquisition is not running and the user can set up
acquisition parameters. Also, the user can use the DQCMD_IOCTL-based command to retrieve input
voltages or set output voltages on a scan-by-scan basis. Before entering configuration mode, the
firmware reads all parameters of the operating mode stored in EEPROM (configuration, channel list,
clock and trigger settings, etc.), processes it, and stores it in the operating mode current parameter set.
In other words, by switching the layer into operation mode, the PowerDNA cube can start data
acquisition right away with previously stored parameters. Switching the layer back into configuration
mode stops the data acquisition process.
The user can switch a layer between configuration and operation modes as many times as
needed.
If the user switches the layer into shutdown mode, the firmware retrieves the output levels of layer
outputs and sets up output voltages. The unit can enter shutdown mode automatically upon watchdog
timeout expiration.
Once a unit is in shutdown mode, only DQCMD_RST can return it into configuration mode.
Mask is a bitmask representation, in which every bit represents a layer. For example, to switch Layer 2
into initialization mode, the mask should be (1 << 2) = 4
Note:
None
- 39 -