Replace hv_mode gate with CS60 hv_limit logic for unrestricted HV setpoints (v1.0.25).

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
raduet
2026-06-30 19:27:47 +02:00
co-authored by Cursor
parent 86b0bfc0fc
commit 49a4fd8ee1
9 changed files with 7938 additions and 7787 deletions
+8
View File
@@ -9,6 +9,14 @@
#define PSU_NUM 1
/* Dynamic LV clamp (CS60 hv_limit): active only on overload at low bus voltage. */
#define PSU_LV_CLAMP_V 499u
#define PSU_HV_LIMIT_ON_THRESHOLD 480u
#define PSU_HV_LIMIT_OFF_THRESHOLD 495u
#define PSU_HV_SWITCH_DELAY_MS 1000u
#define PSU_HV_LOAD_CURRENT 300u /* 30.0 A, MeasuredCurrent is 0.1 A/bit */
#define PSU_HV_LIMIT_MAX_COUNT 3u
/* Fast discharge: PSU off/on cycle on step-down setpoint (unloaded bus). */
#define PSD_ENABLE 1u
#define PSD_MAX_CMD_CURRENT_0P1A 20u /* 2.0 A */