Editing Talk:SC Communication
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
== Syscon packets == | == Syscon packets == | ||
=== | === Timezone/Thermal Service (0x11) === | ||
==== | ==== Get temperature ==== | ||
Purpose: | Purpose: Used to get current temperature. | ||
<pre> | <pre> | ||
struct __attribute__ ((packed)) | struct __attribute__ ((packed)) get_temperature_request_t { | ||
uint8_t cmd; // 0x20 | uint8_t cmd; // 0x20 | ||
uint8_t param; // 0xFF | uint8_t param; // 0xFF | ||
}; | }; | ||
struct __attribute__ ((packed)) | struct __attribute__ ((packed)) get_temperature_response_t { | ||
uint8_t unk1; // status? | uint8_t unk1; // status? | ||
uint8_t unk2; // status? | uint8_t unk2; // status? | ||
Line 407: | Line 18: | ||
</pre> | </pre> | ||
* To calculate temperature in celsius use: (data[0] * 0x64) >> 8. | |||
=== Configuration Service (0x12) === | === Configuration Service (0x12) === | ||
Line 440: | Line 36: | ||
}; | }; | ||
</pre> | </pre> | ||
==== Get IDlog information ==== | ==== Get IDlog information ==== | ||
Line 473: | Line 53: | ||
</pre> | </pre> | ||
==== | ==== Get reference clock ==== | ||
Purpose: Used to calculate an initial value of timebase register. | Purpose: Used to calculate an initial value of timebase register. | ||
<pre> | <pre> | ||
struct __attribute__ ((packed)) get_reference_clock_request_t { | struct __attribute__ ((packed)) get_reference_clock_request_t { | ||
uint8_t cmd; // 0x03 | uint8_t cmd; // 0x03 | ||
uint8_t param; // 0x10 | uint8_t param; // 0x10 | ||
}; | }; | ||
Line 581: | Line 146: | ||
struct __attribute__ ((packed)) reboot_request_t { | struct __attribute__ ((packed)) reboot_request_t { | ||
uint8_t cmd; // 0x01 | uint8_t cmd; // 0x01 | ||
}; | }; | ||
</pre> | </pre> | ||
Line 624: | Line 155: | ||
<pre> | <pre> | ||
struct __attribute__ ((packed)) nvs_access_request_t { | struct __attribute__ ((packed)) nvs_access_request_t { | ||
uint8_t cmd; // | uint8_t cmd; // 0x20 | ||
uint8_t index; | uint8_t index; | ||
uint8_t offset; | uint8_t offset; | ||
uint8_t size; // 0x00 for full block | uint8_t size; // 0x00 for full block | ||
}; | }; | ||
Line 644: | Line 174: | ||
<pre> | <pre> | ||
struct __attribute__ ((packed)) nvs_access_request_t { | struct __attribute__ ((packed)) nvs_access_request_t { | ||
uint8_t cmd; // | uint8_t cmd; // 0x10 | ||
uint8_t index; | uint8_t index; | ||
uint8_t offset; | uint8_t offset; | ||
Line 659: | Line 189: | ||
</pre> | </pre> | ||
=== | ==== Query system power up cause ==== | ||
Purpose: Get information about system power up cause. | |||
<pre> | |||
struct __attribute__ ((packed)) query_system_power_up_cause_request_t { | |||
uint8_t cmd; // 0x10 | |||
}; | |||
struct __attribute__ ((packed)) query_system_power_up_cause_response_t { | |||
uint8_t cmd; | |||
uint8_t padding1[3]; | |||
uint32_t wake_source; | |||
uint8_t requested_os_context; | |||
uint8_t current_os_context; | |||
uint8_t requested_gr_context; | |||
uint8_t current_gr_context; | |||
uint8_t last_shutdown_cause; | |||
uint8_t padding2[3]; | |||
}; | |||
</pre> | |||
==== Get realtime clock ==== | |||
Purpose: Get current value of realtime clock. | |||
<pre> | |||
struct __attribute__ ((packed)) get_rtc_request_t { | |||
uint8_t cmd; // 0x33 | |||
}; | |||
struct __attribute__ ((packed)) get_rtc_response_t { | |||
uint8_t cmd; | |||
uint8_t padding[3]; | |||
uint32_t rtc; | |||
}; | |||
</pre> | |||
=== Livelock Service (0x18) === | |||
==== Get service version ==== | ==== Get service version ==== | ||
Line 678: | Line 242: | ||
==== Get syscon version ==== | ==== Get syscon version ==== | ||
Purpose: Get information about syscon version | Purpose: Get information about syscon version. | ||
<pre> | <pre> | ||
struct __attribute__ ((packed)) get_sc_version_request_t { | struct __attribute__ ((packed)) get_sc_version_request_t { | ||
Line 689: | Line 252: | ||
uint8_t padding[3]; | uint8_t padding[3]; | ||
uint16_t version; | uint16_t version; | ||
}; | }; | ||
</pre> | </pre> | ||
Line 781: | Line 329: | ||
}; | }; | ||
</pre> | </pre> | ||