mirror of https://github.com/rusefi/rusefi.git
EMI kills USB and causes a FATAL on the ECU #4310
only:small-can-board_debug
This commit is contained in:
parent
09c3f3aa5e
commit
a54ace1e8e
|
@ -38,6 +38,7 @@ void checkLastBootError() {
|
|||
efiPrintf("Last boot had raw: %s", sramState->rawMsg);
|
||||
efiPrintf("Last boot had hardFile: %s", sramState->hardFile);
|
||||
efiPrintf("Last boot had line: %d", sramState->hardLine);
|
||||
efiPrintf("Last boot had check: %d", sramState->check);
|
||||
efiPrintf("Last boot had error: %s", sramState->ErrorString);
|
||||
efiPrintf("Last boot had hard fault type: %x addr: %x CSFR: %x", sramState->FaultType, sramState->FaultAddress, sramState->Csfr);
|
||||
if (engineConfiguration->rethrowHardFault) {
|
||||
|
@ -88,6 +89,7 @@ void logHardFault(uint32_t type, uintptr_t faultAddress, port_extctx* ctx, uint3
|
|||
#if EFI_BACKUP_SRAM
|
||||
auto sramState = getBackupSram();
|
||||
sramState->Cookie = ErrorCookie::HardFault;
|
||||
sramState->check = 321;
|
||||
sramState->FaultType = type;
|
||||
sramState->FaultAddress = faultAddress;
|
||||
sramState->Csfr = csfr;
|
||||
|
@ -110,6 +112,7 @@ void chDbgPanic3(const char *msg, const char * file, int line) {
|
|||
if (sramState != nullptr) {
|
||||
strncpy(sramState->hardFile, file, efi::size(sramState->hardFile));
|
||||
sramState->hardLine = line;
|
||||
sramState->check = 123;
|
||||
strncpy(sramState->rawMsg, msg, efi::size(sramState->rawMsg));
|
||||
}
|
||||
#endif // EFI_BACKUP_SRAM
|
||||
|
|
|
@ -54,6 +54,7 @@ struct BackupSramData {
|
|||
critical_msg_t ErrorString;
|
||||
critical_msg_t hardFile;
|
||||
int hardLine;
|
||||
int check;
|
||||
critical_msg_t rawMsg;
|
||||
port_extctx FaultCtx;
|
||||
uint32_t FaultType;
|
||||
|
|
Loading…
Reference in New Issue