Index: ctrl/firmware/Main/CubeMX/charger.ioc
===================================================================
--- ctrl/firmware/Main/CubeMX/charger.ioc	(revision 107)
+++ ctrl/firmware/Main/CubeMX/charger.ioc	(revision 108)
@@ -1,7 +1,31 @@
 #MicroXplorer Configuration settings - do not modify
+ADC2.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_3
+ADC2.Channel-2\#ChannelRegularConversion=ADC_CHANNEL_4
+ADC2.ClockPrescaler=ADC_CLOCK_ASYNC_DIV256
+ADC2.ContinuousConvMode=ENABLE
+ADC2.ConversionDataManagement=ADC_CONVERSIONDATA_DMA_CIRCULAR
+ADC2.EOCSelection=ADC_EOC_SEQ_CONV
+ADC2.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SingleDiff-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,OffsetSignedSaturation-0\#ChannelRegularConversion,NbrOfConversionFlag,NbrOfConversion,Rank-2\#ChannelRegularConversion,Channel-2\#ChannelRegularConversion,SingleDiff-2\#ChannelRegularConversion,SamplingTime-2\#ChannelRegularConversion,OffsetNumber-2\#ChannelRegularConversion,OffsetSignedSaturation-2\#ChannelRegularConversion,ContinuousConvMode,EOCSelection,Overrun,ConversionDataManagement,OversamplingMode,RightBitShift,Ratio,ClockPrescaler
+ADC2.NbrOfConversion=2
+ADC2.NbrOfConversionFlag=1
+ADC2.OffsetNumber-0\#ChannelRegularConversion=ADC_OFFSET_NONE
+ADC2.OffsetNumber-2\#ChannelRegularConversion=ADC_OFFSET_NONE
+ADC2.OffsetSignedSaturation-0\#ChannelRegularConversion=DISABLE
+ADC2.OffsetSignedSaturation-2\#ChannelRegularConversion=DISABLE
+ADC2.Overrun=ADC_OVR_DATA_OVERWRITTEN
+ADC2.OversamplingMode=ENABLE
+ADC2.Rank-0\#ChannelRegularConversion=1
+ADC2.Rank-2\#ChannelRegularConversion=2
+ADC2.Ratio=1024
+ADC2.RightBitShift=ADC_RIGHTBITSHIFT_10
+ADC2.SamplingTime-0\#ChannelRegularConversion=ADC_SAMPLETIME_810CYCLES_5
+ADC2.SamplingTime-2\#ChannelRegularConversion=ADC_SAMPLETIME_810CYCLES_5
+ADC2.SingleDiff-0\#ChannelRegularConversion=ADC_DIFFERENTIAL_ENDED
+ADC2.SingleDiff-2\#ChannelRegularConversion=ADC_DIFFERENTIAL_ENDED
 ADC3.Channel-0\#ChannelRegularConversion=ADC_CHANNEL_10
 ADC3.Channel-1\#ChannelRegularConversion=ADC_CHANNEL_VBAT
 ADC3.Channel-2\#ChannelRegularConversion=ADC_CHANNEL_TEMPSENSOR
 ADC3.Channel-4\#ChannelRegularConversion=ADC_CHANNEL_VREFINT
+ADC3.ClockPrescaler=ADC_CLOCK_ASYNC_DIV256
 ADC3.ClockPrescalerADC3=ADC_CLOCK_ASYNC_DIV256
 ADC3.ContinuousConvMode=ENABLE
@@ -9,5 +33,5 @@
 ADC3.DMAContinuousRequests=ENABLE
 ADC3.EOCSelection=ADC_EOC_SEQ_CONV
-ADC3.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,OffsetSign-0\#ChannelRegularConversion,NbrOfConversionFlag,ContinuousConvMode,DMAContinuousRequests,EOCSelection,Overrun,OversamplingMode,ClockPrescalerADC3,Ratio,NbrOfConversion,RightBitShift,ConversionDataManagement,Rank-1\#ChannelRegularConversion,Channel-1\#ChannelRegularConversion,SamplingTime-1\#ChannelRegularConversion,OffsetNumber-1\#ChannelRegularConversion,OffsetSign-1\#ChannelRegularConversion,Rank-2\#ChannelRegularConversion,Channel-2\#ChannelRegularConversion,SamplingTime-2\#ChannelRegularConversion,OffsetNumber-2\#ChannelRegularConversion,OffsetSign-2\#ChannelRegularConversion,Rank-4\#ChannelRegularConversion,Channel-4\#ChannelRegularConversion,SamplingTime-4\#ChannelRegularConversion,OffsetNumber-4\#ChannelRegularConversion,OffsetSign-4\#ChannelRegularConversion
+ADC3.IPParameters=Rank-0\#ChannelRegularConversion,Channel-0\#ChannelRegularConversion,SamplingTime-0\#ChannelRegularConversion,OffsetNumber-0\#ChannelRegularConversion,OffsetSign-0\#ChannelRegularConversion,NbrOfConversionFlag,ContinuousConvMode,DMAContinuousRequests,EOCSelection,Overrun,OversamplingMode,ClockPrescalerADC3,Ratio,NbrOfConversion,RightBitShift,ConversionDataManagement,Rank-1\#ChannelRegularConversion,Channel-1\#ChannelRegularConversion,SamplingTime-1\#ChannelRegularConversion,OffsetNumber-1\#ChannelRegularConversion,OffsetSign-1\#ChannelRegularConversion,Rank-2\#ChannelRegularConversion,Channel-2\#ChannelRegularConversion,SamplingTime-2\#ChannelRegularConversion,OffsetNumber-2\#ChannelRegularConversion,OffsetSign-2\#ChannelRegularConversion,Rank-4\#ChannelRegularConversion,Channel-4\#ChannelRegularConversion,SamplingTime-4\#ChannelRegularConversion,OffsetNumber-4\#ChannelRegularConversion,OffsetSign-4\#ChannelRegularConversion,ClockPrescaler
 ADC3.NbrOfConversion=4
 ADC3.NbrOfConversionFlag=1
@@ -76,4 +100,22 @@
 DTS.RefClock=DTS_REFCLKSEL_LSE
 DTS.SamplingTime=DTS_SMP_TIME_15_CYCLE
+Dma.ADC2.5.Direction=DMA_PERIPH_TO_MEMORY
+Dma.ADC2.5.EventEnable=DISABLE
+Dma.ADC2.5.FIFOMode=DMA_FIFOMODE_DISABLE
+Dma.ADC2.5.Instance=DMA1_Stream5
+Dma.ADC2.5.MemDataAlignment=DMA_MDATAALIGN_HALFWORD
+Dma.ADC2.5.MemInc=DMA_MINC_ENABLE
+Dma.ADC2.5.Mode=DMA_CIRCULAR
+Dma.ADC2.5.PeriphDataAlignment=DMA_PDATAALIGN_HALFWORD
+Dma.ADC2.5.PeriphInc=DMA_PINC_DISABLE
+Dma.ADC2.5.Polarity=HAL_DMAMUX_REQ_GEN_RISING
+Dma.ADC2.5.Priority=DMA_PRIORITY_VERY_HIGH
+Dma.ADC2.5.RequestNumber=1
+Dma.ADC2.5.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority,FIFOMode,SignalID,Polarity,RequestNumber,SyncSignalID,SyncPolarity,SyncEnable,EventEnable,SyncRequestNumber
+Dma.ADC2.5.SignalID=NONE
+Dma.ADC2.5.SyncEnable=DISABLE
+Dma.ADC2.5.SyncPolarity=HAL_DMAMUX_SYNC_NO_EVENT
+Dma.ADC2.5.SyncRequestNumber=1
+Dma.ADC2.5.SyncSignalID=NONE
 Dma.Request0=SPI4_TX
 Dma.Request1=USART3_RX
@@ -81,5 +123,6 @@
 Dma.Request3=SPI2_RX
 Dma.Request4=SPI2_TX
-Dma.RequestsNb=5
+Dma.Request5=ADC2
+Dma.RequestsNb=6
 Dma.SPI2_RX.3.Direction=DMA_PERIPH_TO_MEMORY
 Dma.SPI2_RX.3.EventEnable=DISABLE
@@ -275,32 +318,33 @@
 Mcu.CPN=STM32H723ZET6
 Mcu.Family=STM32H7
-Mcu.IP0=ADC3
-Mcu.IP1=BDMA
-Mcu.IP10=I2C2
-Mcu.IP11=MEMORYMAP
-Mcu.IP12=NVIC
-Mcu.IP13=RCC
-Mcu.IP14=RTC
-Mcu.IP15=SDMMC1
-Mcu.IP16=SPI2
-Mcu.IP17=SPI4
-Mcu.IP18=SYS
-Mcu.IP19=TIM1
-Mcu.IP2=CORTEX_M7
-Mcu.IP20=TIM3
-Mcu.IP21=TIM6
-Mcu.IP22=TIM8
-Mcu.IP23=USART2
-Mcu.IP24=USART3
-Mcu.IP25=USART10
-Mcu.IP26=VREFBUF
-Mcu.IP3=DAC1
-Mcu.IP4=DEBUG
-Mcu.IP5=DMA
-Mcu.IP6=DTS
-Mcu.IP7=FATFS
-Mcu.IP8=FREERTOS
-Mcu.IP9=I2C1
-Mcu.IPNb=27
+Mcu.IP0=ADC2
+Mcu.IP1=ADC3
+Mcu.IP10=I2C1
+Mcu.IP11=I2C2
+Mcu.IP12=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
-Mcu.Pin60=PB9
-Mcu.Pin61=VP_ADC3_TempSens_Input
-Mcu.Pin62=VP_ADC3_Vref_Input
-Mcu.Pin63=VP_ADC3_Vbat_Input
-Mcu.Pin64=VP_DTS_VS-DTS
-Mcu.Pin65=VP_FATFS_VS_SDIO
-Mcu.Pin66=VP_FREERTOS_VS_CMSIS_V2
-Mcu.Pin67=VP_RTC_VS_RTC_Activate
-Mcu.Pin68=VP_RTC_VS_RTC_Calendar
-Mcu.Pin69=VP_SYS_VS_tim7
+Mcu.Pin60=PB4(NJTRST)
+Mcu.Pin61=PB6
+Mcu.Pin62=PB7
+Mcu.Pin63=PB8
+Mcu.Pin64=PB9
+Mcu.Pin65=VP_ADC3_TempSens_Input
+Mcu.Pin66=VP_ADC3_Vref_Input
+Mcu.Pin67=VP_ADC3_Vbat_Input
+Mcu.Pin68=VP_DTS_VS-DTS
+Mcu.Pin69=VP_FATFS_VS_SDIO
 Mcu.Pin7=PH0-OSC_IN
-Mcu.Pin70=VP_TIM1_VS_ClockSourceINT
-Mcu.Pin71=VP_TIM3_VS_ClockSourceINT
-Mcu.Pin72=VP_TIM6_VS_ClockSourceINT
-Mcu.Pin73=VP_TIM8_VS_ControllerModeReset
-Mcu.Pin74=VP_TIM8_VS_ClockSourceINT
-Mcu.Pin75=VP_VREFBUF_V_VREFBUF
-Mcu.Pin76=VP_MEMORYMAP_VS_MEMORYMAP
-Mcu.Pin77=VP_STMicroelectronics.X-CUBE-EEPRMA1_VS_BoardOoPartJjEEPROM_5.1.0_5.1.0
+Mcu.Pin70=VP_FREERTOS_VS_CMSIS_V2
+Mcu.Pin71=VP_RTC_VS_RTC_Activate
+Mcu.Pin72=VP_RTC_VS_RTC_Calendar
+Mcu.Pin73=VP_SYS_VS_tim7
+Mcu.Pin74=VP_TIM1_VS_ClockSourceINT
+Mcu.Pin75=VP_TIM3_VS_ClockSourceINT
+Mcu.Pin76=VP_TIM6_VS_ClockSourceINT
+Mcu.Pin77=VP_TIM8_VS_ControllerModeReset
+Mcu.Pin78=VP_TIM8_VS_ClockSourceINT
+Mcu.Pin79=VP_VREFBUF_V_VREFBUF
 Mcu.Pin8=PH1-OSC_OUT
+Mcu.Pin80=VP_MEMORYMAP_VS_MEMORYMAP
+Mcu.Pin81=VP_STMicroelectronics.X-CUBE-EEPRMA1_VS_BoardOoPartJjEEPROM_5.1.0_5.1.0
 Mcu.Pin9=PC0
-Mcu.PinsNb=78
+Mcu.PinsNb=82
 Mcu.ThirdParty0=STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0
 Mcu.ThirdParty1=STMicroelectronics.X-CUBE-EEPRMA1.5.1.0
@@ -398,4 +446,5 @@
 NVIC.DMA1_Stream3_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true
 NVIC.DMA1_Stream4_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true
+NVIC.DMA1_Stream5_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true
 NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
 NVIC.EXTI9_5_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
@@ -439,4 +488,10 @@
 PA5.Locked=true
 PA5.Signal=COMP_DAC12_group
+PA6.GPIOParameters=GPIO_Label
+PA6.GPIO_Label=BAT_I_SENSE_PLUS
+PA6.Signal=ADCx_INP3
+PA7.GPIOParameters=GPIO_Label
+PA7.GPIO_Label=BAT_I_SENSE_MINUS
+PA7.Signal=ADCx_INN3
 PA8.GPIOParameters=GPIO_PuPd,GPIO_Label
 PA8.GPIO_Label=SD_DETECT
@@ -499,4 +554,6 @@
 PC15-OSC32_OUT.Mode=LSE-External-Oscillator
 PC15-OSC32_OUT.Signal=RCC_OSC32_OUT
+PC4.Signal=ADCx_INP4
+PC5.Signal=ADCx_INN4
 PC6.GPIOParameters=GPIO_PuPd,GPIO_Label
 PC6.GPIO_Label=FAN_TACHO
@@ -691,94 +748,90 @@
 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_BDMA_Init-BDMA-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-SystemClock_Config-RCC-false-HAL-false,8-MX_FATFS_Init-FATFS-false-HAL-false,9-MX_TIM8_Init-TIM8-false-HAL-true,10-MX_SPI2_Init-SPI2-false-HAL-true,11-MX_USART2_UART_Init-USART2-false-HAL-true,12-MX_USART10_UART_Init-USART10-false-HAL-true,13-MX_TIM6_Init-TIM6-false-HAL-true,14-MX_I2C2_Init-I2C2-false-HAL-true,15-MX_ADC3_Init-ADC3-false-HAL-true,16-MX_TIM3_Init-TIM3-false-HAL-true,17-MX_I2C1_Init-I2C1-false-HAL-true,18-MX_USART3_UART_Init-USART3-false-HAL-true,19-MX_DTS_Init-DTS-false-HAL-true,20-MX_DAC1_Init-DAC1-false-HAL-true,21-MX_TIM1_Init-TIM1-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true,0-MX_VREFBUF_Init-VREFBUF-false-HAL-true
+ProjectManager.functionlistsort=1-MX_GPIO_Init-GPIO-false-HAL-true,2-MX_DMA_Init-DMA-false-HAL-true,3-MX_BDMA_Init-BDMA-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-SystemClock_Config-RCC-false-HAL-false,8-MX_FATFS_Init-FATFS-false-HAL-false,9-MX_TIM8_Init-TIM8-false-HAL-true,10-MX_SPI2_Init-SPI2-false-HAL-true,11-MX_USART2_UART_Init-USART2-false-HAL-true,12-MX_USART10_UART_Init-USART10-false-HAL-true,13-MX_TIM6_Init-TIM6-false-HAL-true,14-MX_I2C2_Init-I2C2-false-HAL-true,15-MX_ADC3_Init-ADC3-false-HAL-true,16-MX_TIM3_Init-TIM3-false-HAL-true,17-MX_I2C1_Init-I2C1-false-HAL-true,18-MX_USART3_UART_Init-USART3-false-HAL-true,19-MX_DTS_Init-DTS-false-HAL-true,20-MX_DAC1_Init-DAC1-false-HAL-true,21-MX_TIM1_Init-TIM1-false-HAL-true,22-MX_ADC2_Init-ADC2-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true,0-MX_VREFBUF_Init-VREFBUF-false-HAL-true
 RCC.ADCCLockSelection=RCC_ADCCLKSOURCE_PLL3
 RCC.ADCFreq_Value=60000000
-RCC.AHB12Freq_Value=275000000
-RCC.AHB4Freq_Value=275000000
-RCC.APB1Freq_Value=137500000
-RCC.APB2Freq_Value=137500000
-RCC.APB3Freq_Value=137500000
-RCC.APB4Freq_Value=137500000
-RCC.AXIClockFreq_Value=275000000
+RCC.AHB12Freq_Value=100000000
+RCC.AHB4Freq_Value=100000000
+RCC.APB1Freq_Value=100000000
+RCC.APB2Freq_Value=100000000
+RCC.APB3Freq_Value=100000000
+RCC.APB4Freq_Value=100000000
+RCC.AXIClockFreq_Value=100000000
 RCC.CECFreq_Value=32000
 RCC.CKPERFreq_Value=64000000
-RCC.CortexFreq_Value=275000000
-RCC.CpuClockFreq_Value=275000000
-RCC.D1CPREFreq_Value=275000000
-RCC.D1PPRE=RCC_APB3_DIV2
-RCC.D2PPRE1=RCC_APB1_DIV2
-RCC.D2PPRE2=RCC_APB2_DIV2
-RCC.D3PPRE=RCC_APB4_DIV2
-RCC.DFSDMACLkFreq_Value=275000000
-RCC.DFSDMFreq_Value=137500000
-RCC.DIVM1=2
+RCC.CortexFreq_Value=100000000
+RCC.CpuClockFreq_Value=100000000
+RCC.D1CPREFreq_Value=100000000
+RCC.DFSDMACLkFreq_Value=100000000
+RCC.DFSDMFreq_Value=100000000
+RCC.DIVM1=5
 RCC.DIVM2=2
 RCC.DIVM3=25
-RCC.DIVN1=44
+RCC.DIVN1=40
 RCC.DIVN2=20
 RCC.DIVN3=180
-RCC.DIVP1Freq_Value=275000000
+RCC.DIVP1Freq_Value=100000000
 RCC.DIVP2Freq_Value=125000000
 RCC.DIVP3Freq_Value=90000000
-RCC.DIVQ1Freq_Value=275000000
+RCC.DIVQ1Freq_Value=100000000
 RCC.DIVQ2=11
 RCC.DIVQ2Freq_Value=22727272.727272727
 RCC.DIVQ3=8
 RCC.DIVQ3Freq_Value=22500000
-RCC.DIVR1Freq_Value=275000000
+RCC.DIVR1Freq_Value=100000000
 RCC.DIVR2=5
 RCC.DIVR2Freq_Value=50000000
 RCC.DIVR3=3
 RCC.DIVR3Freq_Value=60000000
-RCC.FDCANFreq_Value=275000000
-RCC.FMCFreq_Value=275000000
+RCC.FDCANFreq_Value=100000000
+RCC.FMCFreq_Value=100000000
 RCC.FamilyName=M
-RCC.HCLK3ClockFreq_Value=275000000
-RCC.HCLKFreq_Value=275000000
+RCC.HCLK3ClockFreq_Value=100000000
+RCC.HCLKFreq_Value=100000000
 RCC.I2C123CLockSelection=RCC_I2C1235CLKSOURCE_HSI
 RCC.I2C123Freq_Value=64000000
-RCC.I2C4Freq_Value=137500000
-RCC.IPParameters=ADCCLockSelection,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,D1PPRE,D2PPRE1,D2PPRE2,D3PPRE,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,DIVR3,DIVR3Freq_Value,FDCANFreq_Value,FMCFreq_Value,FamilyName,HCLK3ClockFreq_Value,HCLKFreq_Value,I2C123CLockSelection,I2C123Freq_Value,I2C4Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPTIM345Freq_Value,LPUART1Freq_Value,LTDCFreq_Value,MCO1PinFreq_Value,MCO2PinFreq_Value,PLL2FRACN,PLL2_VCI_Range-AdvancedSettings,PLLFRACN,PLLSourceVirtual,QSPIFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI4AFreq_Value,SAI4BFreq_Value,SDMMC1CLockSelection,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=137500000
-RCC.LPTIM2Freq_Value=137500000
-RCC.LPTIM345Freq_Value=137500000
-RCC.LPUART1Freq_Value=137500000
+RCC.I2C4Freq_Value=100000000
+RCC.IPParameters=ADCCLockSelection,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,DIVR3,DIVR3Freq_Value,FDCANFreq_Value,FMCFreq_Value,FamilyName,HCLK3ClockFreq_Value,HCLKFreq_Value,I2C123CLockSelection,I2C123Freq_Value,I2C4Freq_Value,LPTIM1Freq_Value,LPTIM2Freq_Value,LPTIM345Freq_Value,LPUART1Freq_Value,LTDCFreq_Value,MCO1PinFreq_Value,MCO2PinFreq_Value,PLL2FRACN,PLL2_VCI_Range-AdvancedSettings,PLLFRACN,PLLSourceVirtual,QSPIFreq_Value,RNGFreq_Value,RTCClockSelection,RTCFreq_Value,SAI1Freq_Value,SAI4AFreq_Value,SAI4BFreq_Value,SDMMC1CLockSelection,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
+RCC.LPTIM345Freq_Value=100000000
+RCC.LPUART1Freq_Value=100000000
 RCC.LTDCFreq_Value=60000000
 RCC.MCO1PinFreq_Value=64000000
-RCC.MCO2PinFreq_Value=275000000
+RCC.MCO2PinFreq_Value=100000000
 RCC.PLL2FRACN=0
 RCC.PLL2_VCI_Range-AdvancedSettings=RCC_PLL2VCIRANGE_3
 RCC.PLLFRACN=0
 RCC.PLLSourceVirtual=RCC_PLLSOURCE_HSE
-RCC.QSPIFreq_Value=275000000
+RCC.QSPIFreq_Value=100000000
 RCC.RNGFreq_Value=48000000
 RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE
 RCC.RTCFreq_Value=32768
-RCC.SAI1Freq_Value=275000000
-RCC.SAI4AFreq_Value=275000000
-RCC.SAI4BFreq_Value=275000000
+RCC.SAI1Freq_Value=100000000
+RCC.SAI4AFreq_Value=100000000
+RCC.SAI4BFreq_Value=100000000
 RCC.SDMMC1CLockSelection=RCC_SDMMCCLKSOURCE_PLL2
 RCC.SDMMCFreq_Value=50000000
-RCC.SPDIFRXFreq_Value=275000000
+RCC.SPDIFRXFreq_Value=100000000
 RCC.SPI123CLockSelection=RCC_SPI123CLKSOURCE_PLL2
 RCC.SPI123Freq_Value=125000000
 RCC.SPI45Freq_Value=25000000
-RCC.SPI6Freq_Value=137500000
-RCC.SWPMI1Freq_Value=137500000
-RCC.SYSCLKFreq_VALUE=275000000
+RCC.SPI6Freq_Value=100000000
+RCC.SWPMI1Freq_Value=100000000
+RCC.SYSCLKFreq_VALUE=100000000
 RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
 RCC.Spi45ClockSelection=RCC_SPI45CLKSOURCE_HSE
-RCC.Tim1OutputFreq_Value=275000000
-RCC.Tim2OutputFreq_Value=275000000
-RCC.TraceFreq_Value=275000000
+RCC.Tim1OutputFreq_Value=100000000
+RCC.Tim2OutputFreq_Value=100000000
+RCC.TraceFreq_Value=100000000
 RCC.USART16CLockSelection=RCC_USART16910CLKSOURCE_PLL3
 RCC.USART16Freq_Value=22500000
 RCC.USART234578CLockSelection=RCC_USART234578CLKSOURCE_PLL3
 RCC.USART234578Freq_Value=22500000
-RCC.USBFreq_Value=275000000
-RCC.VCO1OutputFreq_Value=550000000
+RCC.USBFreq_Value=100000000
+RCC.VCO1OutputFreq_Value=200000000
 RCC.VCO2OutputFreq_Value=250000000
 RCC.VCO3OutputFreq_Value=180000000
-RCC.VCOInput1Freq_Value=12500000
+RCC.VCOInput1Freq_Value=5000000
 RCC.VCOInput2Freq_Value=12500000
 RCC.VCOInput3Freq_Value=1000000
@@ -791,6 +844,14 @@
 SDMMC1.HardwareFlowControl=SDMMC_HARDWARE_FLOW_CONTROL_ENABLE
 SDMMC1.IPParameters=ClockPowerSave,HardwareFlowControl,ClockDiv
+SH.ADCx_INN3.0=ADC2_INN3,IN3-Differential
+SH.ADCx_INN3.ConfNb=1
+SH.ADCx_INN4.0=ADC2_INN4,IN4-Differential
+SH.ADCx_INN4.ConfNb=1
 SH.ADCx_INP10.0=ADC3_INP10,IN10-Single-Ended
 SH.ADCx_INP10.ConfNb=1
+SH.ADCx_INP3.0=ADC2_INP3,IN3-Differential
+SH.ADCx_INP3.ConfNb=1
+SH.ADCx_INP4.0=ADC2_INP4,IN4-Differential
+SH.ADCx_INP4.ConfNb=1
 SH.COMP_DAC11_group.0=DAC1_OUT1,DAC_OUT1
 SH.COMP_DAC11_group.ConfNb=1
