-
-
Notifications
You must be signed in to change notification settings - Fork 2
[EN] Log Protocol
The logs recorded by TMA-1 are in a format of 16 byte Little Endian.
This is the time elapsed in milliseconds since the TMA-1 was powered on.
Level | value |
---|---|
FATAL | 0 |
ERROR | 1 |
WARN | 2 |
INFO | 3 |
DEBUG | 4 |
The source and key identify the component that generated the log and the type of log.
Source | value | Key | value | parsed |
---|---|---|---|---|
SYS | 0 | SYS_SD_INIT | 0 | |
SYS_CORE_INIT | 1 | |||
SYS_SERIAL_INIT | 2 | |||
SYS_TELEMETRY_REMOTE | 3 | |||
SYS_TELEMETRY_INIT | 4 | |||
CAN_INIT | 5 | |||
DIGITAL_INIT | 6 | |||
ANALOG_INIT | 7 | |||
PULSE_INIT | 8 | |||
ACCELEROMETER_INIT | 9 | |||
GPS_INIT | 10 | |||
SYS_READY | 11 | |||
SYS_RTC_FIX | 12 | |||
SYS_SD_FAIL | 13 | |||
CAN_ERR_CANERR | 14 | |||
CAN_ERR_RXMSGFAIL | 15 | |||
CAN_ERR_FIFOFULL | 16 | |||
CAN | 1 | CAN MSG ID & 0xFF |
CAN MSG data |
|
DIGITAL | 2 | DIGITAL_DATA | 0 |
DIN0 DIN1 DIN2 DIN3 DIN4 DIN5 DIN6 DIN7
|
ANALOG | 3 | ANALOG_SYS | 0 |
CPU_TEMP INPUT_VOLTAGE
|
ANALOG_DATA | 1 |
AIN0 AIN1 AIN2 AIN3
|
||
PULSE | 4 | PULSE_DATA | 0 |
PIN0 PIN1 PIN2 PIN3
|
ACCELEROMETER | 5 | ACCELEROMETER_DATA | 0 |
x y z
|
GPS | 6 | GPS_POS | 0 |
lat lon
|
GPS_VEC | 1 |
speed course
|
||
GPS_TIME | 2 |
utc_date utc_time
|
This is the checksum used to validate the log.
It is the lowest 8 bits of the sum of the remaining 15 bytes excluding itself.
This is a 8 byte data of the log.
SD card initialization record.
value | data |
---|---|
0 | success |
other | FatFs FRESULT |
TMA-1 core system initialization record.
value | data |
---|---|
0 | success |
TMA-1 serial log output buffer initialization record.
value | data |
---|---|
0 | success |
TMA-2 telemetry server connection record.
value | data |
---|---|
0 | server disconnected |
1 | server connected |
Handshake record between STM32 and ESP32
value | data |
---|---|
0 | success |
1 | ESP not found |
2 | ESP I2C not ready |
3 | ESP handshake error |
4 | ESP handshake ruined |
CAN peripheral initialization record.
value | data |
---|---|
0 | success |
1 | filter config fail |
2 | CAN start fail |
3 | FIFO MSG pending notification activation fail |
4 | FIFO full notification activation fail |
5 | FIFO overrun notification activation fail |
6 | BUSOFF notification activation fail |
7 | ERROR notification activation fail |
Digital input channel initialization record.
value | data |
---|---|
0 | success |
Analog input channel initialization record.
value | data |
---|---|
0 | success |
Digital pulse period measurement channel initialization record.
value | data |
---|---|
0 | success |
Accelerometer initialization record.
value | data |
---|---|
0 | success |
1 | error |
2 | busy |
3 | timeout |
GPS module initialization record.
value | data |
---|---|
0 | success |
System initialization complete record.
value | data |
---|---|
0 | success |
RTC time synchronization record.
byte | data |
---|---|
#0 | Year |
#1 | Month |
#2 | Date |
#3 | Hours |
#4 | Minutes |
#5 | Seconds |
#6 | source0 : UART1 : TELEMETRY |
Failure record while SD card mount / open / write / sync operation.
value | data |
---|---|
0 | not specified |
CAN bus error record.
value | data |
---|---|
0 | not specified |
CAN bus message read failure record.
value | data |
---|---|
0 | not specified |
CAN bus message FIFO full error record.
value | data |
---|---|
0 | not specified |
CAN message ID will be stored as a key. Since the key is 1 byte long, only the lowest 8 bits will be stored.
In short, for logs with the source as CAN, the key is CAN message ID & 0xFF
.
This is a digital channel record generated every 100ms.
Each byte indicates the status of the corresponding channel. 0 means the channel is LOW, and 1 means it is HIGH.
byte | data |
---|---|
#0 | DIN0 |
#1 | DIN1 |
#2 | DIN2 |
#3 | DIN3 |
#4 | DIN4 |
#5 | DIN5 |
#6 | DIN6 |
#7 | DIN7 |
A system analog voltage record. It records the core temperature and power voltage every second.
byte | data |
---|---|
#0 ~ #1 | STM32F4 core temperature * 10 |
#2 ~ #3 | VIN voltage / 8 / 3.3 * 4096 |
This is an analog channel record generated every 100ms.
ADC resolution is 12 bits; each channel stores a value between 0 and 4095. The recorded value varies depending on the voltage divider resistors installed in the ANALOG area of the PCB. When the distributed voltage is 3.3V, it results in a recorded value of 4095.
byte | data |
---|---|
#0 ~ #1 | AIN0 |
#2 ~ #3 | AIN1 |
#4 ~ #5 | AIN2 |
#6 ~ #7 | AIN3 |
This is a record for digital waveform period measurement channels. Measurement is activated every 100ms.
A log is recorded when two rising edges are detected in all four channels. The time interval between two rising edges for each channel is recorded in microseconds.
byte | data |
---|---|
#0 ~ #1 | PIN0 |
#2 ~ #3 | PIN1 |
#4 ~ #5 | PIN2 |
#6 ~ #7 | PIN3 |
An accelerometer read record generated every 100ms.
acceleration of each axis * 4 / 512
is an actual acceleration in G unit.
byte | data |
---|---|
#0 ~ #1 | x-axis acceleration |
#2 ~ #3 | y-axis acceleration |
#4 ~ #5 | z-axis acceleration |
GPS log is recorded only if valid GPS data is received. Data is received from the GPS module every 100ms.
A GPS location record.
Each coordinate represents NMEA coordinates * 10000
. It is equal to the value obtained by removing the decimal point from the NMEA coordinate data.
byte | data |
---|---|
#0 ~ #3 | latitude |
#4 ~ #7 | longitude |
A GPS speed and course direction record.
byte | data |
---|---|
#0 ~ #3 | speed(knots * 100) |
#4 ~ #7 | course angle(to true north) |
A GPS time record.
byte | data |
---|---|
#0 ~ #3 | date(mmddyy) |
#4 ~ #7 | time(hhmmss) |
사용하면서 문제나 궁금한 내용이 있다면 자작자동차포럼의 데이터 분석 카테고리에 question
태그를 달아 올려주세요.
If you have any problems or questions while using monolith, you can post it as a Q&A in the Discussions.