@@ -1077,25 +1077,124 @@ Zephyr Fatal Error
1077
1077
==================
1078
1078
1079
1079
This event reports a fatal non-recoverable error from the local Controller.
1080
+ The event may represent Hard Fault, Bluetooth Controller assert or some other
1081
+ non-recoverable error. The content of the event depends on a type of error it
1082
+ represents.
1080
1083
1081
1084
+-------------------------------+------------+-------------------------------+
1082
1085
| Event | Event Code | Event Parameters |
1083
1086
+-------------------------------+------------+-------------------------------+
1084
1087
| Fatal_Error | 0xFF | Subevent_Code, |
1085
- | | | Program_Counter , |
1086
- | | | Error_Info |
1088
+ | | | Error_Data_Type , |
1089
+ | | | Error_Data |
1087
1090
+-------------------------------+------------+-------------------------------+
1088
1091
1089
- The Error_Info provides a string representation of the occurred error. It may
1090
- include information like file name and line numbers .
1092
+ The Error_Data_Type provides an information about what is the Error_Data size
1093
+ and content .
1091
1094
1092
- Subevent_Code: Size: 1 Octet
1095
+ Error_Data_Type: Size: 1 Octet
1096
+ +--------------------+--------------------------------------+
1097
+ | Value | Parameter Description |
1098
+ +--------------------+--------------------------------------+
1099
+ | 0x01 | Stack frame |
1100
+ | 0x02 | Controller assert data |
1101
+ | 0x03 | Trace data |
1102
+ +--------------------+--------------------------------------+
1103
+
1104
+ Error_Data: Size: variable
1105
+ +--------------------+--------------------------------------+
1106
+ | Value | Parameter Description |
1107
+ +--------------------+--------------------------------------+
1108
+ | | Content and size of the parameter |
1109
+ | | depends on the Error_Data_Type |
1110
+ +--------------------+--------------------------------------+
1111
+
1112
+ Zephyr Fatal Error event with Stack Frame data represents a Hard Fault error.
1113
+ The event is tightly related with an architecture of a CPU the Controller is
1114
+ running on.
1115
+
1116
+ +------------------------+--------------------+
1117
+ | Error Data Type | Parameters |
1118
+ +------------------------+--------------------+
1119
+ | Stack_Frame | Error_Reason, |
1120
+ | | Cpu_Type, |
1121
+ | | Cpu_Data |
1122
+ +------------------------+--------------------+
1123
+
1124
+ The Cpu_Type provides information about architecture the event was
1125
+ generated for. Cpu_Data size and content depends on Cpu_Type. This kind of a
1126
+ Zephyr Fatal Error event may be generated by k_sys_fatal_error_handler.
1127
+
1128
+ Error_Reason: Size: 4 Octets
1129
+ +--------------------+--------------------------------------+
1130
+ | Value | Parameter Description |
1131
+ +--------------------+--------------------------------------+
1132
+ | 0xXXXXXXXX | The reason for the fatal error |
1133
+ +--------------------+--------------------------------------+
1134
+
1135
+ Cpu Type: Size: 1 Octet
1093
1136
+--------------------+--------------------------------------+
1094
1137
| Value | Parameter Description |
1095
1138
+--------------------+--------------------------------------+
1096
- | 0x02 | Subevent code for Fatal Error event |
1139
+ | 0x01 | Cortex-M |
1097
1140
+--------------------+--------------------------------------+
1098
1141
1142
+ Cpu Data: Size: variable
1143
+ +--------------------+--------------------------------------+
1144
+ | Value | Parameter Description |
1145
+ +--------------------+--------------------------------------+
1146
+ | | CPU architecture dependent data that |
1147
+ | | represent a stack frame |
1148
+ +--------------------+--------------------------------------+
1149
+
1150
+ CPU Data Cortex-M:
1151
+ +--------------------+----------+---------------------------------+
1152
+ | Parameters | Size | Description |
1153
+ +--------------------+----------+---------------------------------+
1154
+ | a1 | 4 octets | General purpose register |
1155
+ | a2 | 4 octets | General purpose register |
1156
+ | a3 | 4 octets | General purpose register |
1157
+ | a4 | 4 octets | General purpose register |
1158
+ | ip | 4 octets | Instruction pointer register |
1159
+ | lr | 4 octets | Link register |
1160
+ | xpsr | 4 octets | Program status register |
1161
+ +--------------------+--------------------------------------------+
1162
+
1163
+ Zephyr Fatal Error event with Controller Assert data can be generated by the
1164
+ bt_ctlr_assert_handle.
1165
+
1166
+ +------------------------+--------------------+
1167
+ | Error Data Type | Parameters |
1168
+ +------------------------+--------------------+
1169
+ | Controller_Assert_Data | File_Name |
1170
+ | | Line_Number |
1171
+ +------------------------+--------------------+
1172
+
1173
+ File Name: Size: variable
1174
+ +--------------------+--------------------------------------+
1175
+ | Value | Parameter Description |
1176
+ +--------------------+--------------------------------------+
1177
+ | | Null terminated string with file |
1178
+ | | name where an assert happened |
1179
+ +--------------------+--------------------------------------+
1180
+
1181
+ Line Number: Size: 4 Octets
1182
+ +--------------------+--------------------------------------+
1183
+ | Value | Parameter Description |
1184
+ +--------------------+--------------------------------------+
1185
+ | 0xXXXXXXXX | Line number where assert happened |
1186
+ +--------------------+--------------------------------------+
1187
+
1188
+ Other kinds of a non-recoverable system errors can be represented by Zephyr
1189
+ Fatal Error with Trace data.
1190
+
1191
+ +------------------------+--------------------+
1192
+ | Error Data Type | Parameters |
1193
+ +------------------------+--------------------+
1194
+ | Trace_Data | Program_Counter |
1195
+ | | Error_Info |
1196
+ +------------------------+--------------------+
1197
+
1099
1198
Program_Counter: Size: 8 Octets
1100
1199
+--------------------+--------------------------------------+
1101
1200
| Value | Parameter Description |
0 commit comments