Ignore expected PSU output drop after Everest Mode Off (v1.0.32).

Disarm sudden-off diagnostics when host setpoint is already 0 V / 0 A so ISO15118 Welding teardown no longer logs false output_lost.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
raduet
2026-08-10 15:10:04 +02:00
co-authored by Cursor
parent b98207da4c
commit 9d2158d04f
6 changed files with 7776 additions and 7761 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ extern "C" {
/* USER CODE BEGIN EC */ /* USER CODE BEGIN EC */
#define FW_VERSION_MAJOR 1 #define FW_VERSION_MAJOR 1
#define FW_VERSION_MINOR 0 #define FW_VERSION_MINOR 0
#define FW_VERSION_PATCH 31 #define FW_VERSION_PATCH 32
/* USER CODE END EC */ /* USER CODE END EC */
/* Exported macro ------------------------------------------------------------*/ /* Exported macro ------------------------------------------------------------*/
+10 -1
View File
@@ -162,6 +162,10 @@ static void PSU_LogActiveStatusFlags(LogLevel_t level)
* *
* Note: PSU_enabled is derived from V >= PSU_VOLTAGE_THRESHOLD, not from * Note: PSU_enabled is derived from V >= PSU_VOLTAGE_THRESHOLD, not from
* the module enable command bit. * the module enable command bit.
*
* Host Mode::Off (CMD_E2M_SET_OUTPUT_VOLTAGE 0/0) arrives before
* allow_power_on=false during ISO15118 Welding. That is an expected V drop
* while EnableOutput is still 1 — do not treat it as output_lost.
*/ */
static void PSU_MonitorStatusAndUnexpectedOff(void) static void PSU_MonitorStatusAndUnexpectedOff(void)
{ {
@@ -176,15 +180,19 @@ static void PSU_MonitorStatusAndUnexpectedOff(void)
uint32_t now = HAL_GetTick(); uint32_t now = HAL_GetTick();
uint8_t in_charging; uint8_t in_charging;
uint8_t watch_status; uint8_t watch_status;
uint8_t host_export_off;
uint8_t expect_on; uint8_t expect_on;
in_charging = (CONN.connState == Charging); in_charging = (CONN.connState == Charging);
/* Everest setMode(Off) → SET_OUTPUT 0 V / 0 A; contactors may stay closed. */
host_export_off = (CONN.WantedCurrent == 0u) || (CONN.RequestedVoltage == 0u);
watch_status = in_charging && (CONN.EnableOutput != 0) && (PSU0.online != 0) && watch_status = in_charging && (CONN.EnableOutput != 0) && (PSU0.online != 0) &&
((PSU0.state == PSU_CONNECTED) || ((PSU0.state == PSU_CONNECTED) ||
(PSU0.state == PSU_WAIT_ACK_ON) || (PSU0.state == PSU_WAIT_ACK_ON) ||
(PSU0.state == PSU_CONT_WAIT_ACK_ON)); (PSU0.state == PSU_CONT_WAIT_ACK_ON));
expect_on = in_charging && (CONN.EnableOutput != 0) && (PSU0.state == PSU_CONNECTED); expect_on = in_charging && (CONN.EnableOutput != 0) && (PSU0.state == PSU_CONNECTED) &&
!host_export_off;
if (!inited) { if (!inited) {
prev_s0 = PSU0.status0.raw; prev_s0 = PSU0.status0.raw;
@@ -215,6 +223,7 @@ static void PSU_MonitorStatusAndUnexpectedOff(void)
if (!expect_on) { if (!expect_on) {
sudden_cand_ms = 0u; sudden_cand_ms = 0u;
if ((CONN.EnableOutput == 0) || if ((CONN.EnableOutput == 0) ||
host_export_off ||
(CONN.connState != Charging) || (CONN.connState != Charging) ||
(PSU0.state == PSU_READY) || (PSU0.state == PSU_READY) ||
(PSU0.state == PSU_UNREADY) || (PSU0.state == PSU_UNREADY) ||
Binary file not shown.
Binary file not shown.
+3883 -3880
View File
File diff suppressed because it is too large Load Diff
+3882 -3879
View File
File diff suppressed because it is too large Load Diff