Skip to content

Commit ce38bfe

Browse files
committed
BMS/DASH/PCU: HSE clock, TSSI indicator, safety hardening
BMS: - Clock from HSE (PH0/PH1) instead of HSI; PLLM 8->4, PLLSource HSE (CAN needs HSE). - Add FEB_HW_TSSI_Set (PB2): green=healthy, red=fault; driven every SM tick. - Shutdown/AIR- open while energized or driving now latches FAULT_BMS instead of silently returning to LV_POWER. - Precharge threshold 90% -> 80% of pack voltage. - Enable FEB_BMS_DISABLE_ADBMS_CHECKS (bench). Emit bench-override warnings post-scheduler in StartUartRxTask, not in pre-scheduler FEB_Init (a full TX ring blocks on a semaphore that can't be serviced before osKernelStart, hanging boot). Bump UART TX buffer 512 -> 1024. DASH: - Decode BMS state via generated feb_can_bms_state_unpack instead of hand-shifting. - R2D chime only on ENERGIZED<->DRIVE; faults out of DRIVE no longer buzz. - Brake threshold to centi-percent (1000 = 10%); freshness 500 -> 1000ms; drop inverter-enable gate from RTD conditions. PCU: - APPS2 default min 400 -> 550mV. - Don't clear APPS implausibility latch while a short/open circuit is still asserted (prevents a noisy fault from reopening the drive window). - Gate torque on FEB_ADC_CheckAPPSPlausibility() so a single-channel short/open cuts torque immediately.
1 parent 8461e75 commit ce38bfe

18 files changed

Lines changed: 170 additions & 129 deletions

File tree

.cubemx-manifest.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"description": "CubeMX code sync manifest - do not edit manually",
44
"boards": {
55
"BMS": {
6-
"ioc_checksum": "d6b45ba15ffc87250c3261c056210648fd3f53b9eb3bbb3a6cf9e6fb9b9f342f",
7-
"generated_at": "2026-06-12T06:00:02Z",
6+
"ioc_checksum": "80286fd43261cea1eb2d21ef56ffbe570965fc09d3575772c6ddfccd9be45a6d",
7+
"generated_at": "2026-06-13T10:02:41Z",
88
"files": {
99
"Core/Inc/FreeRTOSConfig.h": "363755b7a21dd5a790f0bafbfd68f00abe141fd8691720b3604bc84b7dbaa81b",
1010
"Core/Inc/adc.h": "0ac97025a4065f07b7b65a906bd0c45ea800215434ed43c287c1685507f3f612",
@@ -21,9 +21,9 @@
2121
"Core/Src/can.c": "f5e04678eadb76f6d822b060057362085c98d93b76b176dd249d0a86fcd6c8f6",
2222
"Core/Src/dma.c": "f4e0e37c96eb641193fda73df20c30bc1977cdb8fa419cd2892aacdbe5bdf78b",
2323
"Core/Src/freertos.c": "3aebd38533338b129df88093930230cb41c77e231c63add3ad310de9df6bcb77",
24-
"Core/Src/gpio.c": "529fb0aa0b2c5f2c852999d75dda4d0e45a8c68bd5b156c46b963b27444620e4",
24+
"Core/Src/gpio.c": "c2fc45bccae6c47246d669d2858d7db72a78a661e3a8d622e3923304549c6bfb",
2525
"Core/Src/i2c.c": "d616e686a119d6a1cfad6eee39d81b9245743036d643477d1fb9a3a2b588a157",
26-
"Core/Src/main.c": "fad0e58d62b91861f7c9252e01664e7ec54c89e0e60f72157168a302fbb140ff",
26+
"Core/Src/main.c": "3075800d3786365c2af4d2bf1b4048a110a6a281e0f6cfef1bc01ebfee742346",
2727
"Core/Src/spi.c": "e09e1d6ad9f52bfa7dc9f6357596136692cb67c3c1fdf6f198832de47703ad7f",
2828
"Core/Src/stm32f4xx_hal_msp.c": "c220f834705b367cec12ff62da970a90769c5ce57259670aac76df5240f1f577",
2929
"Core/Src/stm32f4xx_hal_timebase_tim.c": "b466164af62aa9edce6b63ba955915c0bee9cf1aaf4b9aa70014ff632cf12686",
@@ -75,7 +75,7 @@
7575
},
7676
"DASH": {
7777
"ioc_checksum": "919253252bb89abb628b9105693f93510957783991dc2f4608e8da228a4235ea",
78-
"generated_at": "2026-06-12T06:00:04Z",
78+
"generated_at": "2026-06-13T10:02:43Z",
7979
"files": {
8080
"Core/Inc/FreeRTOSConfig.h": "692168cbc9c915133ce3f329cec850c5372c1759ec0412ced61fc14741de14be",
8181
"Core/Inc/can.h": "d9c82c8382c196a76d472a6b82a292a0384a086536ca280ce701ebbba9f5c682",
@@ -177,7 +177,7 @@
177177
},
178178
"DART": {
179179
"ioc_checksum": "5e40a62867a13bf2ccbc21a8343b896b2979b658d024cb6721e46e05b32b5a45",
180-
"generated_at": "2026-06-12T06:00:04Z",
180+
"generated_at": "2026-06-13T10:02:44Z",
181181
"files": {
182182
"Core/Inc/can.h": "8bb6621564cd436d9b9697bc86bc4c6f6ae0492b84673344dfa5a3a2d0ee06cb",
183183
"Core/Inc/dma.h": "7cf6f7450a29d26303cbba5a3ca8c6cb24a02635d6a5ba4d05141fdfc75c4c49",
@@ -203,7 +203,7 @@
203203
},
204204
"DCU": {
205205
"ioc_checksum": "3ca0c8e6d3c37e459605b21b9193ba2cfe5a96315c2aa0cf6f560a585e03e01f",
206-
"generated_at": "2026-06-12T06:00:06Z",
206+
"generated_at": "2026-06-13T10:02:46Z",
207207
"files": {
208208
"Core/Inc/FreeRTOSConfig.h": "f664caa84f355ae18d9faf3f04e5f62d8c95d07210511fb284854ae5a426e17e",
209209
"Core/Inc/can.h": "98925d7f4010f054e17d240116244377377c15248a5413a09ff811cdc23084e5",
@@ -289,7 +289,7 @@
289289
},
290290
"DCU_Receiver": {
291291
"ioc_checksum": "ee791e4c6161c1471ae52fb81c2b892a3aab78da6b64e6bf4180ca8c0d88bf66",
292-
"generated_at": "2026-06-12T06:00:07Z",
292+
"generated_at": "2026-06-13T10:02:47Z",
293293
"files": {
294294
"Core/Inc/FreeRTOSConfig.h": "6b4080b1f5aedb3793f3fb347d7bc61907a53df5104d805995aa77085aaafcd4",
295295
"Core/Inc/dma.h": "7cf6f7450a29d26303cbba5a3ca8c6cb24a02635d6a5ba4d05141fdfc75c4c49",
@@ -356,7 +356,7 @@
356356
},
357357
"LVPDB": {
358358
"ioc_checksum": "aad83d2888e50c4498ca882150e6cc94c6266554b55da81220b3a142c5b5e4b2",
359-
"generated_at": "2026-06-12T06:00:08Z",
359+
"generated_at": "2026-06-13T10:02:47Z",
360360
"files": {
361361
"Core/Inc/can.h": "17611aeff90b90e352bc2ace2749644663492ecb10c71539567ef9b1441fd5d9",
362362
"Core/Inc/dma.h": "7cf6f7450a29d26303cbba5a3ca8c6cb24a02635d6a5ba4d05141fdfc75c4c49",
@@ -384,7 +384,7 @@
384384
},
385385
"PCU": {
386386
"ioc_checksum": "3eaf91e0bfa3eca7f8f45868c51a0ac1dcb92b96efaedca982684c948468503b",
387-
"generated_at": "2026-06-12T06:00:08Z",
387+
"generated_at": "2026-06-13T10:02:48Z",
388388
"files": {
389389
"Core/Inc/adc.h": "e36acfe1b822eff1de7e9f93073b8da32c94dd5b09484b716e190c6aa63eb3d0",
390390
"Core/Inc/can.h": "98925d7f4010f054e17d240116244377377c15248a5413a09ff811cdc23084e5",
@@ -414,7 +414,7 @@
414414
},
415415
"Sensor_Nodes": {
416416
"ioc_checksum": "92d075b8d175250a76dee123ca59955032f2ebe8519ffb49e998bb810b3701f2",
417-
"generated_at": "2026-06-12T06:00:09Z",
417+
"generated_at": "2026-06-13T10:02:49Z",
418418
"files": {
419419
"Core/Inc/adc.h": "0ac97025a4065f07b7b65a906bd0c45ea800215434ed43c287c1685507f3f612",
420420
"Core/Inc/can.h": "98925d7f4010f054e17d240116244377377c15248a5413a09ff811cdc23084e5",
@@ -444,7 +444,7 @@
444444
},
445445
"UART": {
446446
"ioc_checksum": "9ff281c674a516d9870dbee5d60587351e97884ecd27127e2d1464987bf16a17",
447-
"generated_at": "2026-06-12T06:00:10Z",
447+
"generated_at": "2026-06-13T10:02:50Z",
448448
"files": {
449449
"Core/Inc/FreeRTOSConfig.h": "2a0e6022391d5ec198a77021ec3bf284583e245f9ce20c420fb7608f638330d6",
450450
"Core/Inc/dma.h": "7cf6f7450a29d26303cbba5a3ca8c6cb24a02635d6a5ba4d05141fdfc75c4c49",
@@ -504,7 +504,7 @@
504504
},
505505
"UART_TEST": {
506506
"ioc_checksum": "06c9618835096e44e3f73cd158bbc2e3fcf76e65dc9a29db68fe607180843efd",
507-
"generated_at": "2026-06-12T06:00:11Z",
507+
"generated_at": "2026-06-13T10:02:51Z",
508508
"files": {
509509
"Core/Inc/FreeRTOSConfig.h": "773dad076864ff18d5d85603d348d4931d29dde9925486e58f95a97ac98b8404",
510510
"Core/Inc/app_freertos.h": "6229601c2ebf192d40ceef377f3c1785571eaf6407f10bc87be5b06357dd3515",

BMS/BMS.ioc

Lines changed: 62 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -66,44 +66,46 @@ Mcu.IPNb=11
6666
Mcu.Name=STM32F446R(C-E)Tx
6767
Mcu.Package=LQFP64
6868
Mcu.Pin0=PC13
69-
Mcu.Pin1=PC0
70-
Mcu.Pin10=PA6
71-
Mcu.Pin11=PA7
72-
Mcu.Pin12=PC4
73-
Mcu.Pin13=PC5
74-
Mcu.Pin14=PB0
75-
Mcu.Pin15=PB1
76-
Mcu.Pin16=PB2
77-
Mcu.Pin17=PB10
78-
Mcu.Pin18=PB14
79-
Mcu.Pin19=PB15
80-
Mcu.Pin2=PC1
81-
Mcu.Pin20=PC6
82-
Mcu.Pin21=PC7
83-
Mcu.Pin22=PC8
84-
Mcu.Pin23=PA11
85-
Mcu.Pin24=PA12
86-
Mcu.Pin25=PA13
87-
Mcu.Pin26=PA14
88-
Mcu.Pin27=PC10
89-
Mcu.Pin28=PC11
90-
Mcu.Pin29=PC12
91-
Mcu.Pin3=PC2
92-
Mcu.Pin30=PD2
93-
Mcu.Pin31=PB5
94-
Mcu.Pin32=PB6
95-
Mcu.Pin33=PB7
96-
Mcu.Pin34=PB8
97-
Mcu.Pin35=PB9
98-
Mcu.Pin36=VP_FREERTOS_VS_CMSIS_V2
99-
Mcu.Pin37=VP_SYS_VS_tim6
100-
Mcu.Pin4=PC3
101-
Mcu.Pin5=PA0-WKUP
102-
Mcu.Pin6=PA2
103-
Mcu.Pin7=PA3
104-
Mcu.Pin8=PA4
105-
Mcu.Pin9=PA5
106-
Mcu.PinsNb=38
69+
Mcu.Pin1=PH0-OSC_IN
70+
Mcu.Pin10=PA4
71+
Mcu.Pin11=PA5
72+
Mcu.Pin12=PA6
73+
Mcu.Pin13=PA7
74+
Mcu.Pin14=PC4
75+
Mcu.Pin15=PC5
76+
Mcu.Pin16=PB0
77+
Mcu.Pin17=PB1
78+
Mcu.Pin18=PB2
79+
Mcu.Pin19=PB10
80+
Mcu.Pin2=PH1-OSC_OUT
81+
Mcu.Pin20=PB14
82+
Mcu.Pin21=PB15
83+
Mcu.Pin22=PC6
84+
Mcu.Pin23=PC7
85+
Mcu.Pin24=PC8
86+
Mcu.Pin25=PA11
87+
Mcu.Pin26=PA12
88+
Mcu.Pin27=PA13
89+
Mcu.Pin28=PA14
90+
Mcu.Pin29=PC10
91+
Mcu.Pin3=PC0
92+
Mcu.Pin30=PC11
93+
Mcu.Pin31=PC12
94+
Mcu.Pin32=PD2
95+
Mcu.Pin33=PB5
96+
Mcu.Pin34=PB6
97+
Mcu.Pin35=PB7
98+
Mcu.Pin36=PB8
99+
Mcu.Pin37=PB9
100+
Mcu.Pin38=VP_FREERTOS_VS_CMSIS_V2
101+
Mcu.Pin39=VP_SYS_VS_tim6
102+
Mcu.Pin4=PC1
103+
Mcu.Pin5=PC2
104+
Mcu.Pin6=PC3
105+
Mcu.Pin7=PA0-WKUP
106+
Mcu.Pin8=PA2
107+
Mcu.Pin9=PA3
108+
Mcu.PinsNb=40
107109
Mcu.ThirdPartyNb=0
108110
Mcu.UserConstants=
109111
Mcu.UserName=STM32F446RETx
@@ -268,6 +270,10 @@ PD2.GPIOParameters=GPIO_Label
268270
PD2.GPIO_Label=PC_RELAY
269271
PD2.Locked=true
270272
PD2.Signal=GPIO_Output
273+
PH0-OSC_IN.Mode=HSE-External-Oscillator
274+
PH0-OSC_IN.Signal=RCC_OSC_IN
275+
PH1-OSC_OUT.Mode=HSE-External-Oscillator
276+
PH1-OSC_OUT.Signal=RCC_OSC_OUT
271277
PinOutPanel.RotationAngle=0
272278
ProjectManager.AskForMigrate=true
273279
ProjectManager.BackupPrevious=false
@@ -316,36 +322,37 @@ RCC.FMPI2C1Freq_Value=45000000
316322
RCC.FamilyName=M
317323
RCC.HCLKFreq_Value=180000000
318324
RCC.HSE_VALUE=8000000
319-
RCC.I2S1Freq_Value=96000000
320-
RCC.I2S2Freq_Value=96000000
321-
RCC.IPParameters=AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CECFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FMPI2C1Freq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,I2S1Freq_Value,I2S2Freq_Value,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLI2SoutputFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,PLLRCLKFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIoutputFreq_Value,PWRFreq_Value,SAIAFreq_Value,SAIBFreq_Value,SDIOFreq_Value,SPDIFRXFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USBFreq_Value,VCOI2SInputFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIInputFreq_Value,VCOSAIOutputFreq_Value
325+
RCC.I2S1Freq_Value=48000000
326+
RCC.I2S2Freq_Value=48000000
327+
RCC.IPParameters=AHBFreq_Value,APB1CLKDivider,APB1Freq_Value,APB1TimFreq_Value,APB2CLKDivider,APB2Freq_Value,APB2TimFreq_Value,CECFreq_Value,CortexFreq_Value,FCLKCortexFreq_Value,FMPI2C1Freq_Value,FamilyName,HCLKFreq_Value,HSE_VALUE,I2S1Freq_Value,I2S2Freq_Value,MCO2PinFreq_Value,PLLCLKFreq_Value,PLLI2SPCLKFreq_Value,PLLI2SQCLKFreq_Value,PLLI2SRCLKFreq_Value,PLLI2SoutputFreq_Value,PLLM,PLLN,PLLQCLKFreq_Value,PLLRCLKFreq_Value,PLLSAIPCLKFreq_Value,PLLSAIQCLKFreq_Value,PLLSAIoutputFreq_Value,PLLSourceVirtual,PWRFreq_Value,SAIAFreq_Value,SAIBFreq_Value,SDIOFreq_Value,SPDIFRXFreq_Value,SYSCLKFreq_VALUE,SYSCLKSource,USBFreq_Value,VCOI2SInputFreq_Value,VCOI2SOutputFreq_Value,VCOInputFreq_Value,VCOOutputFreq_Value,VCOSAIInputFreq_Value,VCOSAIOutputFreq_Value
322328
RCC.MCO2PinFreq_Value=180000000
323329
RCC.PLLCLKFreq_Value=180000000
324-
RCC.PLLI2SPCLKFreq_Value=96000000
325-
RCC.PLLI2SQCLKFreq_Value=96000000
326-
RCC.PLLI2SRCLKFreq_Value=96000000
327-
RCC.PLLI2SoutputFreq_Value=96000000
328-
RCC.PLLM=8
330+
RCC.PLLI2SPCLKFreq_Value=48000000
331+
RCC.PLLI2SQCLKFreq_Value=48000000
332+
RCC.PLLI2SRCLKFreq_Value=48000000
333+
RCC.PLLI2SoutputFreq_Value=48000000
334+
RCC.PLLM=4
329335
RCC.PLLN=180
330336
RCC.PLLQCLKFreq_Value=180000000
331337
RCC.PLLRCLKFreq_Value=180000000
332-
RCC.PLLSAIPCLKFreq_Value=96000000
333-
RCC.PLLSAIQCLKFreq_Value=96000000
334-
RCC.PLLSAIoutputFreq_Value=96000000
338+
RCC.PLLSAIPCLKFreq_Value=48000000
339+
RCC.PLLSAIQCLKFreq_Value=48000000
340+
RCC.PLLSAIoutputFreq_Value=48000000
341+
RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
335342
RCC.PWRFreq_Value=180000000
336-
RCC.SAIAFreq_Value=96000000
337-
RCC.SAIBFreq_Value=96000000
343+
RCC.SAIAFreq_Value=48000000
344+
RCC.SAIBFreq_Value=48000000
338345
RCC.SDIOFreq_Value=180000000
339346
RCC.SPDIFRXFreq_Value=180000000
340347
RCC.SYSCLKFreq_VALUE=180000000
341348
RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
342349
RCC.USBFreq_Value=180000000
343-
RCC.VCOI2SInputFreq_Value=1000000
344-
RCC.VCOI2SOutputFreq_Value=192000000
350+
RCC.VCOI2SInputFreq_Value=500000
351+
RCC.VCOI2SOutputFreq_Value=96000000
345352
RCC.VCOInputFreq_Value=2000000
346353
RCC.VCOOutputFreq_Value=360000000
347-
RCC.VCOSAIInputFreq_Value=1000000
348-
RCC.VCOSAIOutputFreq_Value=192000000
354+
RCC.VCOSAIInputFreq_Value=500000
355+
RCC.VCOSAIOutputFreq_Value=96000000
349356
SH.ADCx_IN4.0=ADC1_IN4,IN4
350357
SH.ADCx_IN4.ConfNb=1
351358
SPI1.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_128

BMS/Core/Src/gpio.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ void MX_GPIO_Init(void)
4646

4747
/* GPIO Ports Clock Enable */
4848
__HAL_RCC_GPIOC_CLK_ENABLE();
49+
__HAL_RCC_GPIOH_CLK_ENABLE();
4950
__HAL_RCC_GPIOA_CLK_ENABLE();
5051
__HAL_RCC_GPIOB_CLK_ENABLE();
5152
__HAL_RCC_GPIOD_CLK_ENABLE();

BMS/Core/Src/main.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,12 +148,11 @@ void SystemClock_Config(void)
148148
/** Initializes the RCC Oscillators according to the specified parameters
149149
* in the RCC_OscInitTypeDef structure.
150150
*/
151-
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
152-
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
153-
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
151+
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSE;
152+
RCC_OscInitStruct.HSEState = RCC_HSE_ON;
154153
RCC_OscInitStruct.PLL.PLLState = RCC_PLL_ON;
155-
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSI;
156-
RCC_OscInitStruct.PLL.PLLM = 8;
154+
RCC_OscInitStruct.PLL.PLLSource = RCC_PLLSOURCE_HSE;
155+
RCC_OscInitStruct.PLL.PLLM = 4;
157156
RCC_OscInitStruct.PLL.PLLN = 180;
158157
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
159158
RCC_OscInitStruct.PLL.PLLQ = 2;

BMS/Core/User/Inc/FEB_Const.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@
189189
// readings and diagnostics remain visible; only enforcement is suppressed.
190190
// Logs warnings at boot while enabled. NEVER enable with a real pack.
191191
#ifndef FEB_BMS_DISABLE_ADBMS_CHECKS
192-
#define FEB_BMS_DISABLE_ADBMS_CHECKS 0
192+
#define FEB_BMS_DISABLE_ADBMS_CHECKS 1
193193
#endif
194194

195195
#if FEB_BMS_DISABLE_ADBMS_CHECKS

BMS/Core/User/Inc/FEB_HW_Relay.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,12 @@ void FEB_HW_Fault_Indicator_Set(bool on);
7777
*/
7878
void FEB_HW_Buzzer_Set(bool on);
7979

80+
/**
81+
* @brief Set the Tractive System Status Indicator (TSSI_IN, PB2)
82+
* @param green true = high (green / healthy), false = low (red / fault)
83+
*/
84+
void FEB_HW_TSSI_Set(bool green);
85+
8086
/* ============================================================================
8187
* Sense Input Functions
8288
* ============================================================================ */

BMS/Core/User/Src/FEB_HW_Relay.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* - SHS_IN_Pin (PC12): Shutdown loop input
1616
* - SHS_IMD_Pin (PC10): IMD shutdown input
1717
* - SHS_TSMS_Pin (PC11): TSMS indicator light output
18+
* - TSSI_IN_Pin (PB2): Tractive System Status Indicator (high=green, low=red)
1819
*/
1920

2021
#include "FEB_HW_Relay.h"
@@ -66,6 +67,12 @@ void FEB_HW_Buzzer_Set(bool on)
6667
HAL_GPIO_WritePin(BUZZER_EN_GPIO_Port, BUZZER_EN_Pin, on ? GPIO_PIN_SET : GPIO_PIN_RESET);
6768
}
6869

70+
void FEB_HW_TSSI_Set(bool green)
71+
{
72+
/* TSSI_IN (PB2): high = green (healthy), low = red (fault). */
73+
HAL_GPIO_WritePin(TSSI_IN_GPIO_Port, TSSI_IN_Pin, green ? GPIO_PIN_SET : GPIO_PIN_RESET);
74+
}
75+
6976
/* ============================================================================
7077
* Sense Input Functions
7178
* ============================================================================ */

0 commit comments

Comments
 (0)