Difference between revisions of "Psc status"

From MCEWiki
 
Line 4: Line 4:
 
Usage is:
 
Usage is:
  
psc_status -h
+
  psc_status -h
 
   Initial options (MAS config):
 
   Initial options (MAS config):
 
         -c <cmd device>        override default command device
 
         -c <cmd device>        override default command device
Line 13: Line 13:
  
 
The 9 x 32b words returned in response to a psc_status command are described in psc_status.h as:
 
The 9 x 32b words returned in response to a psc_status command are described in psc_status.h as:
#define PSC_DATA_BLK_SIZE 72  
+
#define PSC_DATA_BLK_SIZE 72  
 
+
 
static char psc_data_blk[PSC_DATA_BLK_SIZE] = "";
+
static char psc_data_blk[PSC_DATA_BLK_SIZE] = "";
 
+
#define SILICON_ID          0      // Read from DS18S20 LS 32 bits of 48
+
#define SILICON_ID          0      // Read from DS18S20 LS 32 bits of 48
#define SOFTWARE_VERSION    4*2      // Software Version
+
#define SOFTWARE_VERSION    4*2      // Software Version
#define FAN1_TACH          5*2      // Fan 1 speed /16   
+
#define FAN1_TACH          5*2      // Fan 1 speed /16   
#define FAN2_TACH          6*2      // Fan 2 speed /16
+
#define FAN2_TACH          6*2      // Fan 2 speed /16
#define PSU_TEMP_1          7*2      // temperature 1 from DS18S20
+
#define PSU_TEMP_1          7*2      // temperature 1 from DS18S20
#define PSU_TEMP_2          8*2      // temperature 2 from DS18S20
+
#define PSU_TEMP_2          8*2      // temperature 2 from DS18S20
#define PSU_TEMP_3          9*2      // temperature 3 from DS18S20
+
#define PSU_TEMP_3          9*2      // temperature 3 from DS18S20
#define ADC_OFFSET        10*2      // Grounded ADC input channel reading
+
#define ADC_OFFSET        10*2      // Grounded ADC input channel reading
#define V_VCORE            12*2      // +Vcore supply scaled 0 to +2V
+
#define V_VCORE            12*2      // +Vcore supply scaled 0 to +2V
#define V_VLVD            14*2      // +Vlvd supply scaled 0 to +2V
+
#define V_VLVD            14*2      // +Vlvd supply scaled 0 to +2V
#define V_VAH              16*2      // +Vah supply scaled 0 to +2V
+
#define V_VAH              16*2      // +Vah supply scaled 0 to +2V
#define V_VA_PLUS          18*2      // +Va supply scaled 0 to +2V
+
#define V_VA_PLUS          18*2      // +Va supply scaled 0 to +2V
#define V_VA_MINUS        20*2      // -Va supply scaled 0 to +2V
+
#define V_VA_MINUS        20*2      // -Va supply scaled 0 to +2V
#define I_VCORE            22*2      // Current +Vcore supply scaled
+
#define I_VCORE            22*2      // Current +Vcore supply scaled
#define I_VLVD            24*2      // Current +Vlvd supply scaled
+
#define I_VLVD            24*2      // Current +Vlvd supply scaled
#define I_VAH              26*2      // Current +Vah supply scaled
+
#define I_VAH              26*2      // Current +Vah supply scaled
#define I_VA_PLUS          28*2      // Current +Va supply scaled
+
#define I_VA_PLUS          28*2      // Current +Va supply scaled
#define I_VA_MINUS        30*2      // Current -Va supply scaled
+
#define I_VA_MINUS        30*2      // Current -Va supply scaled
#define STATUS_WORD        32*2      // undefined place for status word
+
#define STATUS_WORD        32*2      // undefined place for status word
#define ACK_NAK            34*2      // either ACK or NAK
+
#define ACK_NAK            34*2      // either ACK or NAK
#define CHECK_BYTE        35*2      // checksum byte
+
#define CHECK_BYTE        35*2      // checksum byte

Revision as of 13:40, 7 September 2010

psc_status is only valid and applicable when the MCE is powered by a PSA switching supply designed and supplied by UBC.

psc_status is a mas application that decodes the information sent back from the MCE in response to a psc_status command. Usage is:

 psc_status -h
 Initial options (MAS config):
       -c <cmd device>         override default command device
       -d         override default data device
       -w <hardware file>      override default hardware configuration file
       -m <MAS config file>    override default MAS configuration file
       -i                      read psc_status as ascii from stdin (no MCE)

The 9 x 32b words returned in response to a psc_status command are described in psc_status.h as:

#define PSC_DATA_BLK_SIZE 72 
 
static char psc_data_blk[PSC_DATA_BLK_SIZE] = "";

#define SILICON_ID          0      // Read from DS18S20 LS 32 bits of 48
#define SOFTWARE_VERSION    4*2      // Software Version
#define FAN1_TACH           5*2      // Fan 1 speed /16   
#define FAN2_TACH           6*2      // Fan 2 speed /16
#define PSU_TEMP_1          7*2      // temperature 1 from DS18S20
#define PSU_TEMP_2          8*2      // temperature 2 from DS18S20
#define PSU_TEMP_3          9*2      // temperature 3 from DS18S20
#define ADC_OFFSET         10*2      // Grounded ADC input channel reading
#define V_VCORE            12*2      // +Vcore supply scaled 0 to +2V
#define V_VLVD             14*2      // +Vlvd supply scaled 0 to +2V
#define V_VAH              16*2      // +Vah supply scaled 0 to +2V
#define V_VA_PLUS          18*2      // +Va supply scaled 0 to +2V
#define V_VA_MINUS         20*2      // -Va supply scaled 0 to +2V
#define I_VCORE            22*2      // Current +Vcore supply scaled
#define I_VLVD             24*2      // Current +Vlvd supply scaled
#define I_VAH              26*2      // Current +Vah supply scaled
#define I_VA_PLUS          28*2      // Current +Va supply scaled
#define I_VA_MINUS         30*2      // Current -Va supply scaled
#define STATUS_WORD        32*2      // undefined place for status word
#define ACK_NAK            34*2      // either ACK or NAK
#define CHECK_BYTE         35*2      // checksum byte