Index: ctrl/firmware/Main/CubeMX/charger.ioc
===================================================================
--- ctrl/firmware/Main/CubeMX/charger.ioc	(revision 65)
+++ ctrl/firmware/Main/CubeMX/charger.ioc	(revision 66)
@@ -3,13 +3,8 @@
 CAD.pinconfig=
 CAD.provider=
-CORTEX_M7.AccessPermission_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_REGION_FULL_ACCESS
-CORTEX_M7.BaseAddress_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=0x30000000
 CORTEX_M7.CPU_DCache=Enabled
 CORTEX_M7.CPU_ICache=Enabled
-CORTEX_M7.DisableExec_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_INSTRUCTION_ACCESS_DISABLE
-CORTEX_M7.Enable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_REGION_ENABLE
-CORTEX_M7.IPParameters=default_mode_Activation,CPU_ICache,CPU_DCache,Enable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,BaseAddress_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,Size_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,AccessPermission_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,DisableExec_S-Cortex_Memory_Protection_Unit_Region1_Settings_S,IsShareable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S
-CORTEX_M7.IsShareable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_ACCESS_SHAREABLE
-CORTEX_M7.Size_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=MPU_REGION_SIZE_1KB
+CORTEX_M7.Enable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S=__NULL
+CORTEX_M7.IPParameters=default_mode_Activation,CPU_ICache,CPU_DCache,Enable_S-Cortex_Memory_Protection_Unit_Region1_Settings_S
 CORTEX_M7.default_mode_Activation=1
 Dma.Request0=SPI4_TX
@@ -80,5 +75,7 @@
 Mcu.IP0=CORTEX_M7
 Mcu.IP1=DEBUG
-Mcu.IP10=USART3
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7
 Mcu.Pin4=PH1-OSC_OUT
-Mcu.Pin40=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0
-Mcu.Pin41=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0
+Mcu.Pin40=VP_TIM3_VS_ClockSourceINT
+Mcu.Pin41=VP_TIM8_VS_ControllerModeReset
+Mcu.Pin42=VP_TIM8_VS_ClockSourceINT
+Mcu.Pin43=VP_MEMORYMAP_VS_MEMORYMAP
+Mcu.Pin44=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0
+Mcu.Pin45=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0
+Mcu.Pin46=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0
 Mcu.Pin5=PF15
 Mcu.Pin6=PG0
@@ -134,5 +136,5 @@
 Mcu.Pin8=PE7
 Mcu.Pin9=PE11
-Mcu.PinsNb=42
+Mcu.PinsNb=47
 Mcu.ThirdParty0=STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0
 Mcu.ThirdPartyNb=1
@@ -159,5 +161,7 @@
 NVIC.SavedSystickIrqHandlerGenerated=true
 NVIC.SysTick_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:true\:false
+NVIC.TIM3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
 NVIC.TIM7_IRQn=true\:15\:0\:false\:false\:true\:false\:false\:true\:true
+NVIC.TIM8_CC_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true
 NVIC.TimeBase=TIM7_IRQn
 NVIC.TimeBaseIP=TIM7
@@ -183,4 +187,13 @@
 PC15-OSC32_OUT.Mode=LSE-External-Oscillator
 PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
+PC6.GPIOParameters=GPIO_PuPd,GPIO_Label
+PC6.GPIO_Label=FAN_TACHO
+PC6.GPIO_PuPd=GPIO_PULLUP
+PC6.Locked=true
+PC6.Signal=S_TIM8_CH1
+PC7.GPIOParameters=GPIO_Label
+PC7.GPIO_Label=FAN_PWM
+PC7.Locked=true
+PC7.Signal=S_TIM3_CH2
 PC8.Locked=true
 PC8.Mode=SD_4_bits_Wide_bus
@@ -315,5 +328,5 @@
 ProjectManager.UAScriptBeforePath=
 ProjectManager.UnderRoot=true
-ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_RTC_Init-RTC-false-HAL-true,5-MX_SPI4_Init-SPI4-false-HAL-true,6-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,7-MX_USART3_UART_Init-USART3-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
+ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_RTC_Init-RTC-false-HAL-true,5-MX_SPI4_Init-SPI4-false-HAL-true,6-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,7-MX_USART3_UART_Init-USART3-false-HAL-true,8-MX_TIM3_Init-TIM3-false-HAL-true,9-MX_TIM8_Init-TIM8-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
 RCC.ADCFreq_Value=166666666.66666666
 RCC.AHB12Freq_Value=100000000
@@ -400,4 +413,9 @@
 SDMMC1.HardwareFlowControl=SDMMC_HARDWARE_FLOW_CONTROL_ENABLE
 SDMMC1.IPParameters=ClockPowerSave,HardwareFlowControl
+SH.S_TIM3_CH2.0=TIM3_CH2,PWM Generation2 CH2
+SH.S_TIM3_CH2.ConfNb=1
+SH.S_TIM8_CH1.0=TIM8_CH1,Input_Capture1_from_TI1
+SH.S_TIM8_CH1.1=TIM8_CH1,TriggerSource_TI1FP1
+SH.S_TIM8_CH1.ConfNb=2
 SPI4.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
 SPI4.CalculateBaudRate=6.25 MBits/s
@@ -417,5 +435,5 @@
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileOoSystemJjInterfaces_Checked=true
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.FileXCcFileOoSystemJjFileXJjCore=true
-STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.IPParameters=TX_APP_MEM_POOL_SIZE,FX_APP_MEM_POOL_SIZE,TX_APP_GENERATE_INIT_CODE,TX_APP_CREATION,TX_ENABLE_STACK_CHECKING,TX_NO_FILEX_POINTER,TX_LOW_POWER,FX_ENABLE_EXFAT,FX_ENABLE_FAULT_TOLERANT,FX_FAULT_TOLERANT,FX_FAULT_TOLERANT_DATA,FX_DRIVER_SD_INIT,TX_TIMER_TICKS_PER_SECOND,ThreadXCcRTOSJjThreadXJjCore,ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport,FileXCcFileOoSystemJjFileXJjCore,InterfacesCcFileOoSystemJjFileXOoSDOointerface,TX_APP_MSG_QUEUE_CREATION,TX_MSG_QUEUE_NAME,TX_NB_MSG
+STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.IPParameters=TX_APP_MEM_POOL_SIZE,FX_APP_MEM_POOL_SIZE,TX_APP_GENERATE_INIT_CODE,TX_APP_CREATION,TX_ENABLE_STACK_CHECKING,TX_NO_FILEX_POINTER,TX_LOW_POWER,FX_ENABLE_EXFAT,FX_ENABLE_FAULT_TOLERANT,FX_FAULT_TOLERANT,FX_FAULT_TOLERANT_DATA,FX_DRIVER_SD_INIT,TX_TIMER_TICKS_PER_SECOND,TX_APP_MSG_QUEUE_CREATION,TX_MSG_QUEUE_NAME,TX_NB_MSG,ThreadXCcRTOSJjThreadXJjCore,ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport,FileXCcFileOoSystemJjFileXJjCore,InterfacesCcFileOoSystemJjFileXOoSDOointerface
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.InterfacesCcFileOoSystemJjFileXOoSDOointerface=true
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0.RTOSJjThreadX_Checked=true
@@ -434,4 +452,17 @@
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_IsAnAzureRtosMw=true
 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_SwParameter=InterfacesCcFileOoSystemJjFileXOoSDOointerface\:true;ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport\:true;FileXCcFileOoSystemJjFileXJjCore\:true;ThreadXCcRTOSJjThreadXJjCore\:true;
+TIM3.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE
+TIM3.Channel-PWM\ Generation2\ CH2=TIM_CHANNEL_2
+TIM3.IPParameters=AutoReloadPreload,Channel-PWM Generation2 CH2,Prescaler,Period,Pulse-PWM Generation2 CH2,OCPolarity_2
+TIM3.OCPolarity_2=TIM_OCPOLARITY_LOW
+TIM3.Period=1000
+TIM3.Prescaler=3
+TIM3.Pulse-PWM\ Generation2\ CH2=200
+TIM8.AutoReloadPreload=TIM_AUTORELOAD_PRELOAD_ENABLE
+TIM8.Channel-Input_Capture1_from_TI1=TIM_CHANNEL_1
+TIM8.ICPolarity_CH1=TIM_INPUTCHANNELPOLARITY_BOTHEDGE
+TIM8.IPParameters=Channel-Input_Capture1_from_TI1,ICPolarity_CH1,Prescaler,AutoReloadPreload,Period
+TIM8.Period=65536 - 1
+TIM8.Prescaler=32 - 1
 USART3.DMADisableonRxErrorParam=ADVFEATURE_DMA_DISABLEONRXERROR
 USART3.IPParameters=VirtualMode-Asynchronous,SwapParam,DMADisableonRxErrorParam
@@ -450,3 +481,9 @@
 VP_SYS_VS_tim7.Mode=TIM7
 VP_SYS_VS_tim7.Signal=SYS_VS_tim7
+VP_TIM3_VS_ClockSourceINT.Mode=Internal
+VP_TIM3_VS_ClockSourceINT.Signal=TIM3_VS_ClockSourceINT
+VP_TIM8_VS_ClockSourceINT.Mode=Internal
+VP_TIM8_VS_ClockSourceINT.Signal=TIM8_VS_ClockSourceINT
+VP_TIM8_VS_ControllerModeReset.Mode=Reset Mode
+VP_TIM8_VS_ControllerModeReset.Signal=TIM8_VS_ControllerModeReset
 board=custom
