UART read commands - Geowissenschaften/EXCISS GitHub Wiki
UART protocol and command lists
rdt
rdt = read date time
MCU return value:
RX_SCU = rdt
[ TIMEKEEPER ]
current_unix_timestamp = 1500770250
current_datetime = 2017-7-23T0:37:30
Example:
- SCU -> MCU :
rdt
- SCU <- MCU :
RX_SCU = rdt
[ TIMEKEEPER ]
current_unix_timestamp = 1500770250
current_datetime = 2017-7-23T0:37:30
rdm
rdt = read debug mode
MCU returns if debug mode is enabled:
RX_S0 = rdm
[ MCU ]
debug mode is enabled
turned off datatransfer window
[ TIMEKEEPER ]
a = 55
b = 55
c = 55
d = 55
e = 55
MCU returns if debug mode is enabled:
RX_S0 = rdm
[ MCU ]
debug mode is disabled
datatransfer window activated
[ TIMEKEEPER ]
a = AA
b = AA
c = AA
d = AA
e = AA
rom
rom = read operation mode
MCU return values:
RCOVERY
: The system is in recovery modeSCIENCE
: The system is in science mode
Exampe:
- SCU -> MCU :
rom
- SCU <- MCU :
RX_SCU = rom
[ SCU ]
scu_mode = RECOVERY
sd_card = 1
frame_power = 1
next_datatransfer_seconds = 72648
rsc
rsc = read status charger
MCU return value:
Exampe:
- SCU -> MCU :
rsc
- SCU <- MCU :
RX_SCU = rsc
[ POWER ][ PSU ][ charger ]
adcVBUS = 5184
adcPSYS = 3060
adcIBATCharge = 0
adcIBATDischarge = 0
adcIIN = 0
adcCMPIN = -1
adcVSYS = 2880
adcVBAT = 16768
rsg
rsg = read status gauge
MCU return value:
Exampe:
- SCU -> MCU :
rsc
- SCU <- MCU :
RX_SCU = rsg
[ POWER ][ PSU ][ gauge ]
maxError = 100
voltage = 16468
current = 0
batteryChemID = waiting for implementation
remainingCurrent = 4157
fullChargCapacity = 4161
minToFull = -1
minToEmpty = -1
minRuntime = -1
temperature = 3027
chargeRelative = 100
chargeAbsolute = 95
batteryStatus = 11100111
cycleCount = 0
cell1voltage = 4100
cell2voltage = 4121
cell3voltage = 4122
cell4voltage = 4124
rsl
rsl = read status log
MCU return value:
Exampe:
- SCU -> MCU :
rsl
- SCU <- MCU : ``
rsp
rsp = read status power
Example:
- SCU -> MCU :
rsp
- SCU <- MCU :
[ POWER ]
vsys = off
3V = off
12V = off
SCU = on
USB_X = on
USB_A = off
USB_B = off
USB_HUB = on
rst
rst = read status temperature
Example:
- SCU -> MCU :
rsta
- SCU <- MCU :
RX_SCU = rsta
[ TEMPSENS ]
sensor_addr = 28,40,C5,90,0A,00,00,10
sensor_temperature = 34.50
sensor_addr = 28,C0,92,09,0A,00,00,4C
sensor_temperature = 35.25
sensor_addr = 28,70,41,90,0A,00,00,29
sensor_temperature = 34.31
sensor_addr = 28,DA,5D,90,0A,00,00,E7
sensor_temperature = 34.31
sensor_addr = 28,7E,58,09,0A,00,00,C7
sensor_temperature = 33.69
sensor_addr = 28,D9,7B,09,0A,00,00,A8
sensor_temperature = 33.63
sensor_addr = 28,03,1C,09,0A,00,00,E3
sensor_temperature = 34.31
sensor_addr = 28,87,97,46,0A,00,00,14
sensor_temperature = 37.75
sensor_addr = 28,E7,BA,08,0A,00,00,36
sensor_temperature = 30.56
sensor_addr = 28,9F,78,08,0A,00,00,AE
sensor_temperature = 33.50
Example:
- SCU -> MCU :
rst3
- SCU <- MCU :
RX_SCU = rst3
[ TEMPSENS ]
sensor_addr = 28,40,C5,90,0A,00,00,10,28,C0,92,09,0A,00,00,
sensor_temperature = 31.37
rsi
rsi = read status i2c
RX_S0 = rsi
[ BusMaster ]
i2c_address = 5A
i2c_lock_status = 55
i2c_address = 18
i2c_lock_status = 55
i2c_address = 9
i2c_lock_status = 55
i2c_address = B
i2c_lock_status = 55
i2c_address = 68
i2c_lock_status = 55
ris
ris = read ignition status
MCU return value:
HVU states
off
standby
charging
charged
wait_ignition
aborted
failed
int values
- cap_voltage = (0-800)
- cap_voltage_before_ignition = (0-800)
- cap_voltage_after_ignition = (0-800)
- ignition_timestamp = (RTC unix_timestamp)
Exampe:
- SCU -> MCU :
ris
- SCU <- MCU :
RX_S0 = ris
[ HVU ]
hvu_state = standby
cap_voltage = 5
igniton_target_voltage = 0
charg_target_voltage = 0
last_ignition_result = 0
last_ignition_time = 0
charge_voltage_before_ignition = 0
charge_voltage_after_ignition = 0
hvu_state transitions:
rta
rta = read timer all
RX_S0 = rta
[ MUC ][ SM ]
[ keep alive ]
keep_alive = 300
keep_alive_remaining_sec = not active
[ wakeup ]
wakeup = 600000
wakeup_remaining_sec = 592