Index: ctrl/firmware/Main/CubeMX/charger.ioc
===================================================================
--- ctrl/firmware/Main/CubeMX/charger.ioc	(revision 76)
+++ ctrl/firmware/Main/CubeMX/charger.ioc	(revision 77)
@@ -249,4 +249,5 @@
 NVIC.DMA1_Stream2_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
 NVIC.ForceEnableDMAVector=true
 NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false
@@ -256,4 +257,5 @@
 NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
 NVIC.SDMMC1_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
+NVIC.SPI2_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true
 NVIC.SPI4_IRQn=true\:5\:0\:false\:false\:true\:true\:false\:true\:true
 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:false\:false\:false\:false\:false
@@ -278,25 +280,29 @@
 PA8.Locked=true
 PA8.Signal=GPIO_Input
-PB10.GPIOParameters=GPIO_Label
+PB10.GPIOParameters=GPIO_Speed,GPIO_Label
 PB10.GPIO_Label=ETH_SPI_SCK
+PB10.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
 PB10.Mode=Full_Duplex_Master
 PB10.Signal=SPI2_SCK
-PB14.GPIOParameters=GPIO_Label
+PB14.GPIOParameters=GPIO_Speed,GPIO_Label
 PB14.GPIO_Label=ETH_SPI_MISO
+PB14.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
 PB14.Locked=true
 PB14.Mode=Full_Duplex_Master
 PB14.Signal=SPI2_MISO
-PB15.GPIOParameters=GPIO_Label
+PB15.GPIOParameters=GPIO_Speed,GPIO_Label
 PB15.GPIO_Label=ETH_SPI_MOSI
+PB15.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH
 PB15.Locked=true
 PB15.Mode=Full_Duplex_Master
 PB15.Signal=SPI2_MOSI
-PB4(NJTRST).GPIOParameters=GPIO_Label
+PB4(NJTRST).GPIOParameters=PinState,GPIO_Label
 PB4(NJTRST).GPIO_Label=ETH_SPI_NSS
 PB4(NJTRST).Locked=true
-PB4(NJTRST).Mode=NSS_Signal_Hard_Output
-PB4(NJTRST).Signal=SPI2_NSS
-PB8.GPIOParameters=GPIO_Label
+PB4(NJTRST).PinState=GPIO_PIN_SET
+PB4(NJTRST).Signal=GPIO_Output
+PB8.GPIOParameters=GPIO_Label,GPIO_ModeDefaultEXTI
 PB8.GPIO_Label=ETH_SPI_INT
+PB8.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_FALLING
 PB8.Locked=true
 PB8.Signal=GPXTI8
@@ -462,5 +468,5 @@
 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
-RCC.ADCFreq_Value=166666666.66666666
+RCC.ADCFreq_Value=125000000
 RCC.AHB12Freq_Value=100000000
 RCC.AHB4Freq_Value=100000000
@@ -475,26 +481,25 @@
 RCC.CpuClockFreq_Value=100000000
 RCC.D1CPREFreq_Value=100000000
-RCC.DFSDMACLkFreq_Value=50000000
+RCC.DFSDMACLkFreq_Value=100000000
 RCC.DFSDMFreq_Value=100000000
 RCC.DIVM1=5
-RCC.DIVM2=3
+RCC.DIVM2=2
 RCC.DIVM3=25
 RCC.DIVN1=40
-RCC.DIVN2=40
+RCC.DIVN2=20
 RCC.DIVN3=200
 RCC.DIVP1Freq_Value=100000000
-RCC.DIVP2Freq_Value=166666666.66666666
+RCC.DIVP2Freq_Value=125000000
 RCC.DIVP3Freq_Value=100000000
-RCC.DIVQ1=4
-RCC.DIVQ1Freq_Value=50000000
+RCC.DIVQ1Freq_Value=100000000
 RCC.DIVQ2=11
-RCC.DIVQ2Freq_Value=30303030.3030303
+RCC.DIVQ2Freq_Value=22727272.727272727
 RCC.DIVQ3=8
 RCC.DIVQ3Freq_Value=25000000
 RCC.DIVR1Freq_Value=100000000
 RCC.DIVR2=10
-RCC.DIVR2Freq_Value=33333333.333333332
+RCC.DIVR2Freq_Value=25000000
 RCC.DIVR3Freq_Value=100000000
-RCC.FDCANFreq_Value=50000000
+RCC.FDCANFreq_Value=100000000
 RCC.FMCFreq_Value=100000000
 RCC.FamilyName=M
@@ -503,5 +508,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,DIVQ1,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,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,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
@@ -518,10 +523,11 @@
 RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE
 RCC.RTCFreq_Value=32768
-RCC.SAI1Freq_Value=50000000
-RCC.SAI4AFreq_Value=50000000
-RCC.SAI4BFreq_Value=50000000
-RCC.SDMMCFreq_Value=50000000
-RCC.SPDIFRXFreq_Value=50000000
-RCC.SPI123Freq_Value=50000000
+RCC.SAI1Freq_Value=100000000
+RCC.SAI4AFreq_Value=100000000
+RCC.SAI4BFreq_Value=100000000
+RCC.SDMMCFreq_Value=100000000
+RCC.SPDIFRXFreq_Value=100000000
+RCC.SPI123CLockSelection=RCC_SPI123CLKSOURCE_PLL2
+RCC.SPI123Freq_Value=125000000
 RCC.SPI45Freq_Value=25000000
 RCC.SPI6Freq_Value=100000000
@@ -536,10 +542,10 @@
 RCC.USART234578CLockSelection=RCC_USART234578CLKSOURCE_PLL3
 RCC.USART234578Freq_Value=25000000
-RCC.USBFreq_Value=50000000
+RCC.USBFreq_Value=100000000
 RCC.VCO1OutputFreq_Value=200000000
-RCC.VCO2OutputFreq_Value=333333333.3333333
+RCC.VCO2OutputFreq_Value=250000000
 RCC.VCO3OutputFreq_Value=200000000
 RCC.VCOInput1Freq_Value=5000000
-RCC.VCOInput2Freq_Value=8333333.333333333
+RCC.VCOInput2Freq_Value=12500000
 RCC.VCOInput3Freq_Value=1000000
 SDMMC1.ClockDiv=1
@@ -554,13 +560,13 @@
 SH.S_TIM8_CH1.1=TIM8_CH1,TriggerSource_TI1FP1
 SH.S_TIM8_CH1.ConfNb=2
-SPI2.CalculateBaudRate=25.0 MBits/s
+SPI2.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_2
+SPI2.CalculateBaudRate=62.5 MBits/s
 SPI2.DataSize=SPI_DATASIZE_8BIT
 SPI2.Direction=SPI_DIRECTION_2LINES
-SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate,VirtualNSS,DataSize,MasterInterDataIdleness,MasterSSIdleness,MasterKeepIOState
-SPI2.MasterInterDataIdleness=SPI_MASTER_INTERDATA_IDLENESS_06CYCLE
-SPI2.MasterKeepIOState=SPI_MASTER_KEEP_IO_STATE_ENABLE
-SPI2.MasterSSIdleness=SPI_MASTER_SS_IDLENESS_03CYCLE
+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.MasterSSIdleness=SPI_MASTER_SS_IDLENESS_00CYCLE
 SPI2.Mode=SPI_MODE_MASTER
-SPI2.VirtualNSS=VM_NSSHARD
 SPI2.VirtualType=VM_MASTER
 SPI4.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4
