that should do the job
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Robin Müller 2023-04-06 22:39:57 +02:00
parent ca44b541b1
commit e9fc0c453d
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 5 additions and 2 deletions

View File

@ -68,9 +68,11 @@ static constexpr Event REBOOT_COUNTER = event::makeEvent(SUBSYSTEM_ID, 7, severi
//! P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1.
//! P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.
static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
//! [EXPORT] : [COMMENT] I2C is unavailable. Triggered to system object can take further steps
//! like I2C reboot or reboot.
//! [EXPORT] : [COMMENT] I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C
//! devices.
static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
//! [EXPORT] : [COMMENT] I2C is unavailable. Recovery did not work, performing full reboot.
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
} // namespace core

View File

@ -169,6 +169,7 @@ void EiveSystem::i2cRecoveryLogic() {
if (i2cRecoveryClearCountdown.hasTimedOut()) {
i2cErrors = 0;
alreadyTriedI2cRecovery = false;
i2cRebootHandlingCountdown.resetTimer();
}
// If an I2C recovery is not ongoing and the I2C error counter is above a threshold, try
// recovery or reboot if recovery was already attempted.