Skip to content

Commit

Permalink
security board: hardware diag
Browse files Browse the repository at this point in the history
report hardware components' states with HardwareDiagnostic message
make HardwareDiagnostic a common message for both boards
  • Loading branch information
fouge authored Mar 11, 2024
2 parents 6307b15 + b1208b7 commit 92497b3
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 39 deletions.
39 changes: 39 additions & 0 deletions messages/mcu_messaging_common.proto
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,45 @@ message FatalError
uint32 arg = 2;
}

// Diagnostic information about hardware components
// - Source: which sensor/actuator is being reported
// - Status: Source status
message HardwareDiagnostic
{
enum Source {
// main board
OPTICS_MIRRORS = 0;
OPTICS_IR_LEDS = 1;
OPTICS_CAMERAS = 2;
OPTICS_LIQUID_LENS = 3;
OPTICS_1D_TOF = 4;
OPTICS_EYE_SAFETY_CIRCUIT_SELF_TEST = 5;
GNSS = 6;
TEMPERATURE_SENSORS_FRONT_UNIT = 7;
TEMPERATURE_SENSORS_MAIN_BOARD = 8;
TEMPERATURE_SENSORS_LIQUID_LENS = 9;
UI_ALS = 10;
UI_SOUND = 11;
MAIN_BOARD_SENTINEL = 12; // subject to change

// security board
SE050 = 50;
SECURITY_BOARD_SENTINEL = 51; // subject to change

UNKNOWN = 100;
}

enum Status {
STATUS_OK = 0;
STATUS_INITIALIZATION_ERROR = 1;
STATUS_SAFETY_ISSUE = 2;
STATUS_UNKNOWN = 3;
}

Source source = 1;
Status status = 2;
}

message FirmwareVersion
{
uint32 major = 1;
Expand Down
39 changes: 0 additions & 39 deletions messages/mcu_messaging_main.proto
Original file line number Diff line number Diff line change
Expand Up @@ -615,45 +615,6 @@ message AmbientLight
Flags flag = 2;
}

// Diagnostic information about hardware components
// - Source: which sensor/actuator is being reported
// - Status: Source status
message HardwareDiagnostic
{
enum Source {
// main board
OPTICS_MIRRORS = 0;
OPTICS_IR_LEDS = 1;
OPTICS_CAMERAS = 2;
OPTICS_LIQUID_LENS = 3;
OPTICS_1D_TOF = 4;
OPTICS_EYE_SAFETY_CIRCUIT_SELF_TEST = 5;
GNSS = 6;
TEMPERATURE_SENSORS_FRONT_UNIT = 7;
TEMPERATURE_SENSORS_MAIN_BOARD = 8;
TEMPERATURE_SENSORS_LIQUID_LENS = 9;
UI_ALS = 10;
UI_SOUND = 11;
MAIN_BOARD_SENTINEL = 12; // subject to change

// security board
SE050 = 50;
SECURITY_BOARD_SENTINEL = 51; // subject to change

UNKNOWN = 100;
}

enum Status {
STATUS_OK = 0;
STATUS_INITIALIZATION_ERROR = 1;
STATUS_SAFETY_ISSUE = 2;
STATUS_UNKNOWN = 3;
}

Source source = 1;
Status status = 2;
}

//
// *** NOTE: IR Eye Focus Sweep ***
//
Expand Down
1 change: 1 addition & 0 deletions messages/mcu_messaging_sec.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ message SecToJetson
private.TamperStates tamper_states = 10;
Temperature temperature = 11;
MemfaultEvent memfault_event = 12;
HardwareDiagnostic hardware_diag = 13;
}
}

Expand Down

0 comments on commit 92497b3

Please sign in to comment.