Index: ctrl/firmware/Main/CubeMX/charger.ioc
===================================================================
--- ctrl/firmware/Main/CubeMX/charger.ioc	(revision 79)
+++ ctrl/firmware/Main/CubeMX/charger.ioc	(revision 81)
@@ -209,5 +209,7 @@
 Mcu.IP13=TIM3
 Mcu.IP14=TIM8
-Mcu.IP15=USART3
+Mcu.IP15=USART2
+Mcu.IP16=USART3
+Mcu.IP17=USART10
 Mcu.IP2=DMA
 Mcu.IP3=FATFS
@@ -218,62 +220,68 @@
 Mcu.IP8=RTC
 Mcu.IP9=SDMMC1
-Mcu.IPNb=16
+Mcu.IPNb=18
 Mcu.Name=STM32H723ZETx
 Mcu.Package=LQFP144
-Mcu.Pin0=PE6
-Mcu.Pin1=PC14-OSC32_IN
-Mcu.Pin10=PE12
-Mcu.Pin11=PE13
-Mcu.Pin12=PE14
-Mcu.Pin13=PE15
-Mcu.Pin14=PB10
-Mcu.Pin15=PB14
-Mcu.Pin16=PB15
-Mcu.Pin17=PD8
-Mcu.Pin18=PD9
-Mcu.Pin19=PD10
-Mcu.Pin2=PC15-OSC32_OUT
-Mcu.Pin20=PD11
-Mcu.Pin21=PD12
-Mcu.Pin22=PD13
-Mcu.Pin23=PC6
-Mcu.Pin24=PC7
-Mcu.Pin25=PC8
-Mcu.Pin26=PC9
-Mcu.Pin27=PA8
-Mcu.Pin28=PA13(JTMS/SWDIO)
-Mcu.Pin29=PA14(JTCK/SWCLK)
-Mcu.Pin3=PH0-OSC_IN
-Mcu.Pin30=PC10
-Mcu.Pin31=PC11
-Mcu.Pin32=PC12
-Mcu.Pin33=PD2
-Mcu.Pin34=PD3
-Mcu.Pin35=PD7
-Mcu.Pin36=PG9
-Mcu.Pin37=PG10
-Mcu.Pin38=PG11
-Mcu.Pin39=PG12
-Mcu.Pin4=PH1-OSC_OUT
-Mcu.Pin40=PG13
-Mcu.Pin41=PG15
-Mcu.Pin42=PB4(NJTRST)
-Mcu.Pin43=PB8
-Mcu.Pin44=PB9
-Mcu.Pin45=VP_FATFS_V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G15
+Mcu.Pin48=PB4(NJTRST)
+Mcu.Pin49=PB8
+Mcu.Pin5=PH0-OSC_IN
+Mcu.Pin50=PB9
+Mcu.Pin51=VP_FATFS_VS_SDIO
+Mcu.Pin52=VP_FREERTOS_VS_CMSIS_V2
+Mcu.Pin53=VP_RTC_VS_RTC_Activate
+Mcu.Pin54=VP_RTC_VS_RTC_Calendar
+Mcu.Pin55=VP_SYS_VS_tim7
+Mcu.Pin56=VP_TIM3_VS_ClockSourceINT
+Mcu.Pin57=VP_TIM8_VS_ControllerModeReset
+Mcu.Pin58=VP_TIM8_VS_ClockSourceINT
+Mcu.Pin59=VP_MEMORYMAP_VS_MEMORYMAP
+Mcu.Pin6=PH1-OSC_OUT
+Mcu.Pin7=PF15
+Mcu.Pin8=PG0
+Mcu.Pin9=PG1
+Mcu.PinsNb=60
 Mcu.ThirdParty0=STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0
 Mcu.ThirdPartyNb=1
@@ -309,4 +317,6 @@
 NVIC.TimeBase=TIM7_IRQn
 NVIC.TimeBaseIP=TIM7
+NVIC.USART10_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
+NVIC.USART2_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
 NVIC.USART3_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
 NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
@@ -394,4 +404,19 @@
 PD3.PinState=GPIO_PIN_SET
 PD3.Signal=GPIO_Output
+PD4.GPIOParameters=GPIO_Label
+PD4.GPIO_Label=USART_MODBUS_SLAVE_DE
+PD4.Locked=true
+PD4.Mode=Hardware Flow Control (RS485)
+PD4.Signal=USART2_DE
+PD5.GPIOParameters=GPIO_Label
+PD5.GPIO_Label=USART_MODBUS_SLAVE_TX
+PD5.Locked=true
+PD5.Mode=Asynchronous
+PD5.Signal=USART2_TX
+PD6.GPIOParameters=GPIO_Label
+PD6.GPIO_Label=USART_MODBUS_SLAVE_RX
+PD6.Locked=true
+PD6.Mode=Asynchronous
+PD6.Signal=USART2_RX
 PD7.GPIOParameters=GPIO_Label
 PD7.GPIO_Label=OUTPUT_ON_LED
@@ -428,4 +453,12 @@
 PE15.PinState=GPIO_PIN_RESET
 PE15.Signal=GPIO_Output
+PE2.GPIOParameters=GPIO_Label
+PE2.GPIO_Label=USART_MODBUS_MASTER_RX
+PE2.Mode=Asynchronous
+PE2.Signal=USART10_RX
+PE3.GPIOParameters=GPIO_Label
+PE3.GPIO_Label=USART_MODBUS_MASTER_TX
+PE3.Mode=Asynchronous
+PE3.Signal=USART10_TX
 PE6.GPIOParameters=GPIO_Label
 PE6.GPIO_Label=TX1_LED
@@ -464,4 +497,8 @@
 PG13.Locked=true
 PG13.Signal=GPIO_Output
+PG14.GPIOParameters=GPIO_Label
+PG14.GPIO_Label=USART_MODBUS_MASTER_DE
+PG14.Mode=Hardware Flow Control (RS485)
+PG14.Signal=USART10_DE
 PG15.GPIOParameters=GPIO_Label
 PG15.GPIO_Label=BUZZER
@@ -507,5 +544,5 @@
 ProjectManager.UAScriptBeforePath=
 ProjectManager.UnderRoot=true
-ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-MX_RTC_Init-RTC-false-HAL-true,4-MX_SPI4_Init-SPI4-false-HAL-true,5-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,6-MX_USART3_UART_Init-USART3-false-HAL-true,7-MX_TIM3_Init-TIM3-false-HAL-true,8-SystemClock_Config-RCC-false-HAL-false,9-MX_FATFS_Init-FATFS-false-HAL-false,10-MX_TIM8_Init-TIM8-false-HAL-true,11-MX_SPI2_Init-SPI2-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
+ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-MX_RTC_Init-RTC-false-HAL-true,4-MX_SPI4_Init-SPI4-false-HAL-true,5-MX_SDMMC1_SD_Init-SDMMC1-false-HAL-true,6-MX_USART3_UART_Init-USART3-false-HAL-true,7-MX_TIM3_Init-TIM3-false-HAL-true,8-SystemClock_Config-RCC-false-HAL-false,9-MX_FATFS_Init-FATFS-false-HAL-false,10-MX_TIM8_Init-TIM8-false-HAL-true,11-MX_SPI2_Init-SPI2-false-HAL-true,12-MX_USART2_UART_Init-USART2-false-HAL-true,13-MX_USART10_UART_Init-USART10-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
 RCC.ADCFreq_Value=125000000
 RCC.AHB12Freq_Value=100000000
@@ -548,5 +585,5 @@
 RCC.I2C123Freq_Value=100000000
 RCC.I2C4Freq_Value=100000000
-RCC.IPParameters=ADCFreq_Value,AHB12Freq_Value,AHB4Freq_Value,APB1Freq_Value,APB2Freq_Value,APB3Freq_Value,APB4Freq_Value,AXIClockFreq_Value,CECFreq_Value,CKPERFreq_Value,CortexFreq_Value,CpuClockFreq_Value,D1CPREFreq_Value,DFSDMACLkFreq_Value,DFSDMFreq_Value,DIVM1,DIVM2,DIVM3,DIVN1,DIVN2,DIVN3,DIVP1Freq_Value,DIVP2Freq_Value,DIVP3Freq_Value,DIVQ1Freq_Value,DIVQ2,DIVQ2Freq_Value,DIVQ3,DIVQ3Freq_Value,DIVR1Freq_Value,DIVR2,DIVR2Freq_Value,DIVR3Freq_Value,FDCANFreq_Value,FMCFreq_Value,FamilyName,HCLK3ClockFreq_Value,HCLKFreq_Value,I2C123Freq_Value,I2C4Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPTIM345Freq_Value,LPUART1Freq_Value,LTDCFreq_Value,MCO1PinFreq_Value,MCO2PinFreq_Value,PLL2FRACN,PLLFRACN,PLLSourceVirtual,QSPIFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI4AFreq_Value,SAI4BFreq_Value,SDMMCFreq_Value,SPDIFRXFreq_Value,SPI123CLockSelection,SPI123Freq_Value,SPI45Freq_Value,SPI6Freq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,Spi45ClockSelection,Tim1OutputFreq_Value,Tim2OutputFreq_Value,TraceFreq_Value,USART16Freq_Value,USART234578CLockSelection,USART234578Freq_Value,USBFreq_Value,VCO1OutputFreq_Value,VCO2OutputFreq_Value,VCO3OutputFreq_Value,VCOInput1Freq_Value,VCOInput2Freq_Value,VCOInput3Freq_Value
+RCC.IPParameters=ADCFreq_Value,AHB12Freq_Value,AHB4Freq_Value,APB1Freq_Value,APB2Freq_Value,APB3Freq_Value,APB4Freq_Value,AXIClockFreq_Value,CECFreq_Value,CKPERFreq_Value,CortexFreq_Value,CpuClockFreq_Value,D1CPREFreq_Value,DFSDMACLkFreq_Value,DFSDMFreq_Value,DIVM1,DIVM2,DIVM3,DIVN1,DIVN2,DIVN3,DIVP1Freq_Value,DIVP2Freq_Value,DIVP3Freq_Value,DIVQ1Freq_Value,DIVQ2,DIVQ2Freq_Value,DIVQ3,DIVQ3Freq_Value,DIVR1Freq_Value,DIVR2,DIVR2Freq_Value,DIVR3Freq_Value,FDCANFreq_Value,FMCFreq_Value,FamilyName,HCLK3ClockFreq_Value,HCLKFreq_Value,I2C123Freq_Value,I2C4Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPTIM345Freq_Value,LPUART1Freq_Value,LTDCFreq_Value,MCO1PinFreq_Value,MCO2PinFreq_Value,PLL2FRACN,PLLFRACN,PLLSourceVirtual,QSPIFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI4AFreq_Value,SAI4BFreq_Value,SDMMCFreq_Value,SPDIFRXFreq_Value,SPI123CLockSelection,SPI123Freq_Value,SPI45Freq_Value,SPI6Freq_Value,SWPMI1Freq_Value,SYSCLKFreq_VALUE,SYSCLKSource,Spi45ClockSelection,Tim1OutputFreq_Value,Tim2OutputFreq_Value,TraceFreq_Value,USART16CLockSelection,USART16Freq_Value,USART234578CLockSelection,USART234578Freq_Value,USBFreq_Value,VCO1OutputFreq_Value,VCO2OutputFreq_Value,VCO3OutputFreq_Value,VCOInput1Freq_Value,VCOInput2Freq_Value,VCOInput3Freq_Value
 RCC.LPTIM1Freq_Value=100000000
 RCC.LPTIM2Freq_Value=100000000
@@ -579,5 +616,6 @@
 RCC.Tim2OutputFreq_Value=100000000
 RCC.TraceFreq_Value=100000000
-RCC.USART16Freq_Value=100000000
+RCC.USART16CLockSelection=RCC_USART16910CLKSOURCE_PLL3
+RCC.USART16Freq_Value=25000000
 RCC.USART234578CLockSelection=RCC_USART234578CLKSOURCE_PLL3
 RCC.USART234578Freq_Value=25000000
@@ -600,11 +638,11 @@
 SH.S_TIM8_CH1.1=TIM8_CH1,TriggerSource_TI1FP1
 SH.S_TIM8_CH1.ConfNb=2
-SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_2
-SPI2.CalculateBaudRate=62.5 MBits/s
+SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_256
+SPI2.CalculateBaudRate=488.281 KBits/s
 SPI2.DataSize=SPI_DATASIZE_8BIT
 SPI2.Direction=SPI_DIRECTION_2LINES
 SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,DataSize,MasterInterDataIdleness,MasterSSIdleness,MasterKeepIOState,BaudRatePrescaler
 SPI2.MasterInterDataIdleness=SPI_MASTER_INTERDATA_IDLENESS_01CYCLE
-SPI2.MasterKeepIOState=SPI_MASTER_KEEP_IO_STATE_DISABLE
+SPI2.MasterKeepIOState=SPI_MASTER_KEEP_IO_STATE_ENABLE
 SPI2.MasterSSIdleness=SPI_MASTER_SS_IDLENESS_00CYCLE
 SPI2.Mode=SPI_MODE_MASTER
@@ -653,4 +691,10 @@
 TIM8.Period=65536 - 1
 TIM8.Prescaler=32 - 1
+USART10.IPParameters=VirtualMode-Asynchronous,VirtualMode-Hardware Flow Control (RS485)
+USART10.VirtualMode-Asynchronous=VM_ASYNC
+USART10.VirtualMode-Hardware\ Flow\ Control\ (RS485)=VM_ASYNC
+USART2.IPParameters=VirtualMode-Asynchronous,VirtualMode-Hardware Flow Control (RS485)
+USART2.VirtualMode-Asynchronous=VM_ASYNC
+USART2.VirtualMode-Hardware\ Flow\ Control\ (RS485)=VM_ASYNC
 USART3.DMADisableonRxErrorParam=ADVFEATURE_DMA_DISABLEONRXERROR
 USART3.IPParameters=VirtualMode-Asynchronous,SwapParam,DMADisableonRxErrorParam
