7 - 38
emPC-CXR
(
Hardware Manual
)
•
System Control
©
Janz Tec AG
Rev. V1.2
0b1000000000000000
Sensor error
7.1.3
Command Codes
This section lists the command codes that are accepted by the PMON firmware. Undocumented
command codes should not be issued.
CMD
code
Command
Description
0
IDLE
When read, this command code indicates idle state.
1
SAVE_EEP
Save all parameters that are indicated as “EEPROM saved”
into the PMON MCUs internal EEPROM. This makes
changes permanent.
Before writing, some simple sanity checks are made. E.g.
you cannot save a voltage threshold that is higher than the
supported operating value.
No checks are made on the timing parameters.
2
RESET_ERR
Reset the PMON MCU reset information in the STATUS
register.
9
PACADCREAD
Read ADC data from the ispPAC chip. The channel is
selected by the DATA register.
Channel
Voltage Rail
Factor
0
Vin
7.8
1
+12V
3
2
N/A
-
3
+5V
1
4
+3.3V
1
5
+1.2V
1
6
Vin-A
8.8
7
Vin-B
8.8
8
N/A
-
9
N/A
-
The returned value is a correct ADC value if bit 0 of the
DATA register is 1.
To convert to a voltage value use the following formula:
Voltage
/mV = ((
DATA
>>4)&0xfff) * 2 *
factor
Where factor is taken from the table above.
Vin-A and Vin-B channels allow to monitor both power supply
inputs independently, to allow identify broken down power
supplies. Accuracy is not very high for these channels.