Changeset 51 for ctrl/firmware/Main/CubeMX
- Timestamp:
- Dec 6, 2024, 11:57:29 AM (6 weeks ago)
- Location:
- ctrl/firmware/Main/CubeMX
- Files:
-
- 6 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/CubeMX/Core/Inc/stm32h7xx_hal_conf.h
r47 r51 70 70 #define HAL_RTC_MODULE_ENABLED 71 71 /* #define HAL_SAI_MODULE_ENABLED */ 72 /* #define HAL_SD_MODULE_ENABLED */ 72 #define HAL_SD_MODULE_ENABLED 73 73 /* #define HAL_MMC_MODULE_ENABLED */ 74 74 /* #define HAL_SPDIFRX_MODULE_ENABLED */ -
ctrl/firmware/Main/CubeMX/Core/Inc/stm32h7xx_it.h
r45 r51 57 57 void SysTick_Handler(void); 58 58 void DMA1_Stream0_IRQHandler(void); 59 void SDMMC1_IRQHandler(void); 59 60 void SPI4_IRQHandler(void); 60 61 /* USER CODE BEGIN EFP */ -
ctrl/firmware/Main/CubeMX/Core/Src/gpio.c
r50 r51 86 86 /*Configure GPIO pins : PC13 PC0 PC1 PC2 87 87 PC3 PC4 PC5 PC6 88 PC7 PC8 PC9 PC10 89 PC11 PC12 */ 88 PC7 */ 90 89 GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2 91 90 |GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6 92 |GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10 93 |GPIO_PIN_11|GPIO_PIN_12; 91 |GPIO_PIN_7; 94 92 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; 95 93 GPIO_InitStruct.Pull = GPIO_NOPULL; … … 144 142 /*Configure GPIO pins : PD8 PD9 PD10 PD11 145 143 PD12 PD13 PD14 PD15 146 PD0 PD1 PD 2 PD3147 PD 4 PD5 PD6 */144 PD0 PD1 PD3 PD4 145 PD5 PD6 */ 148 146 GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11 149 147 |GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15 150 |GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_ 2|GPIO_PIN_3151 |GPIO_PIN_ 4|GPIO_PIN_5|GPIO_PIN_6;148 |GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_3|GPIO_PIN_4 149 |GPIO_PIN_5|GPIO_PIN_6; 152 150 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; 153 151 GPIO_InitStruct.Pull = GPIO_NOPULL; -
ctrl/firmware/Main/CubeMX/Core/Src/main.c
r50 r51 22 22 #include "memorymap.h" 23 23 #include "rtc.h" 24 #include "sdmmc.h" 24 25 #include "spi.h" 25 26 #include "gpio.h" … … 114 115 MX_RTC_Init(); 115 116 MX_SPI4_Init(); 117 MX_SDMMC1_SD_Init(); 116 118 /* USER CODE BEGIN 2 */ 117 119 … … 170 172 RCC_OscInitStruct.PLL.PLLN = 40; 171 173 RCC_OscInitStruct.PLL.PLLP = 2; 172 RCC_OscInitStruct.PLL.PLLQ = 2;174 RCC_OscInitStruct.PLL.PLLQ = 4; 173 175 RCC_OscInitStruct.PLL.PLLR = 2; 174 176 RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1VCIRANGE_2; -
ctrl/firmware/Main/CubeMX/Core/Src/spi.c
r50 r51 85 85 */ 86 86 PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_SPI4; 87 PeriphClkInitStruct.PLL2.PLL2M = 3; 88 PeriphClkInitStruct.PLL2.PLL2N = 40; 89 PeriphClkInitStruct.PLL2.PLL2P = 2; 90 PeriphClkInitStruct.PLL2.PLL2Q = 11; 91 PeriphClkInitStruct.PLL2.PLL2R = 2; 92 PeriphClkInitStruct.PLL2.PLL2RGE = RCC_PLL2VCIRANGE_3; 93 PeriphClkInitStruct.PLL2.PLL2VCOSEL = RCC_PLL2VCOWIDE; 94 PeriphClkInitStruct.PLL2.PLL2FRACN = 0; 95 PeriphClkInitStruct.Spi45ClockSelection = RCC_SPI45CLKSOURCE_PLL2; 87 PeriphClkInitStruct.Spi45ClockSelection = RCC_SPI45CLKSOURCE_HSE; 96 88 if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) 97 89 { -
ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c
r45 r51 56 56 57 57 /* External variables --------------------------------------------------------*/ 58 extern SD_HandleTypeDef hsd1; 58 59 extern DMA_HandleTypeDef hdma_spi4_tx; 59 60 extern SPI_HandleTypeDef hspi4; … … 215 216 216 217 /** 218 * @brief This function handles SDMMC1 global interrupt. 219 */ 220 void SDMMC1_IRQHandler(void) 221 { 222 /* USER CODE BEGIN SDMMC1_IRQn 0 */ 223 224 /* USER CODE END SDMMC1_IRQn 0 */ 225 HAL_SD_IRQHandler(&hsd1); 226 /* USER CODE BEGIN SDMMC1_IRQn 1 */ 227 228 /* USER CODE END SDMMC1_IRQn 1 */ 229 } 230 231 /** 217 232 * @brief This function handles SPI4 global interrupt. 218 233 */ -
ctrl/firmware/Main/CubeMX/charger.ioc
r50 r51 41 41 Mcu.IP5=RCC 42 42 Mcu.IP6=RTC 43 Mcu.IP7=SPI4 44 Mcu.IP8=SYS 45 Mcu.IPNb=9 43 Mcu.IP7=SDMMC1 44 Mcu.IP8=SPI4 45 Mcu.IP9=SYS 46 Mcu.IPNb=10 46 47 Mcu.Name=STM32H723ZETx 47 48 Mcu.Package=LQFP144 48 49 Mcu.Pin0=PE6 49 50 Mcu.Pin1=PC14-OSC32_IN 50 Mcu.Pin10=P A13(JTMS/SWDIO)51 Mcu.Pin11=P A14(JTCK/SWCLK)52 Mcu.Pin12=P D753 Mcu.Pin13=P G954 Mcu.Pin14=P G1055 Mcu.Pin15=P G1156 Mcu.Pin16=P G1257 Mcu.Pin17=P G1358 Mcu.Pin18= VP_RTC_VS_RTC_Activate59 Mcu.Pin19= VP_SYS_VS_Systick51 Mcu.Pin10=PC8 52 Mcu.Pin11=PC9 53 Mcu.Pin12=PA13(JTMS/SWDIO) 54 Mcu.Pin13=PA14(JTCK/SWCLK) 55 Mcu.Pin14=PC10 56 Mcu.Pin15=PC11 57 Mcu.Pin16=PC12 58 Mcu.Pin17=PD2 59 Mcu.Pin18=PD7 60 Mcu.Pin19=PG9 60 61 Mcu.Pin2=PC15-OSC32_OUT 61 Mcu.Pin20=VP_MEMORYMAP_VS_MEMORYMAP 62 Mcu.Pin20=PG10 63 Mcu.Pin21=PG11 64 Mcu.Pin22=PG12 65 Mcu.Pin23=PG13 66 Mcu.Pin24=VP_RTC_VS_RTC_Activate 67 Mcu.Pin25=VP_SYS_VS_Systick 68 Mcu.Pin26=VP_MEMORYMAP_VS_MEMORYMAP 62 69 Mcu.Pin3=PH0-OSC_IN 63 70 Mcu.Pin4=PH1-OSC_OUT … … 67 74 Mcu.Pin8=PE14 68 75 Mcu.Pin9=PE15 69 Mcu.PinsNb=2 176 Mcu.PinsNb=27 70 77 Mcu.ThirdPartyNb=0 71 78 Mcu.UserConstants= … … 82 89 NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false 83 90 NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 91 NVIC.SDMMC1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true 84 92 NVIC.SPI4_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true 85 93 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false … … 90 98 PA14(JTCK/SWCLK).Mode=Serial_Wire 91 99 PA14(JTCK/SWCLK).Signal=DEBUG_JTCK-SWCLK 100 PC10.Mode=SD_4_bits_Wide_bus 101 PC10.Signal=SDMMC1_D2 102 PC11.Mode=SD_4_bits_Wide_bus 103 PC11.Signal=SDMMC1_D3 104 PC12.Mode=SD_4_bits_Wide_bus 105 PC12.Signal=SDMMC1_CK 92 106 PC14-OSC32_IN.Mode=LSE-External-Oscillator 93 107 PC14-OSC32_IN.Signal=RCC_OSC32_IN 94 108 PC15-OSC32_OUT.Mode=LSE-External-Oscillator 95 109 PC15-OSC32_OUT.Signal=RCC_OSC32_OUT 110 PC8.Locked=true 111 PC8.Mode=SD_4_bits_Wide_bus 112 PC8.Signal=SDMMC1_D0 113 PC9.Mode=SD_4_bits_Wide_bus 114 PC9.Signal=SDMMC1_D1 115 PD2.Mode=SD_4_bits_Wide_bus 116 PD2.Signal=SDMMC1_CMD 96 117 PD7.GPIOParameters=GPIO_Label 97 118 PD7.GPIO_Label=OUTPUT_ON_LED … … 195 216 RCC.CpuClockFreq_Value=100000000 196 217 RCC.D1CPREFreq_Value=100000000 197 RCC.DFSDMACLkFreq_Value= 100000000218 RCC.DFSDMACLkFreq_Value=50000000 198 219 RCC.DFSDMFreq_Value=100000000 199 220 RCC.DIVM1=5 200 221 RCC.DIVM2=3 201 RCC.DIVM3= 25222 RCC.DIVM3=1 202 223 RCC.DIVN1=40 203 224 RCC.DIVN2=40 204 RCC.DIVN3= 200225 RCC.DIVN3=4 205 226 RCC.DIVP1Freq_Value=100000000 206 227 RCC.DIVP2Freq_Value=166666666.66666666 207 RCC.DIVP3Freq_Value=100000000 208 RCC.DIVQ1Freq_Value=100000000 228 RCC.DIVP3Freq_Value=50000000 229 RCC.DIVQ1=4 230 RCC.DIVQ1Freq_Value=50000000 209 231 RCC.DIVQ2=11 210 232 RCC.DIVQ2Freq_Value=30303030.3030303 211 RCC.DIVQ3Freq_Value= 100000000233 RCC.DIVQ3Freq_Value=50000000 212 234 RCC.DIVR1Freq_Value=100000000 213 RCC.DIVR2Freq_Value=166666666.66666666 214 RCC.DIVR3Freq_Value=100000000 215 RCC.FDCANFreq_Value=100000000 235 RCC.DIVR2=10 236 RCC.DIVR2Freq_Value=33333333.333333332 237 RCC.DIVR3Freq_Value=50000000 238 RCC.FDCANFreq_Value=50000000 216 239 RCC.FMCFreq_Value=100000000 217 240 RCC.FamilyName=M … … 220 243 RCC.I2C123Freq_Value=100000000 221 244 RCC.I2C4Freq_Value=100000000 222 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 Freq_Value,DIVQ2,DIVQ2Freq_Value,DIVQ3Freq_Value,DIVR1Freq_Value,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,USART234578Freq_Value,USBFreq_Value,VCO1OutputFreq_Value,VCO2OutputFreq_Value,VCO3OutputFreq_Value,VCOInput1Freq_Value,VCOInput2Freq_Value,VCOInput3Freq_Value245 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,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,USART234578Freq_Value,USBFreq_Value,VCO1OutputFreq_Value,VCO2OutputFreq_Value,VCO3OutputFreq_Value,VCOInput1Freq_Value,VCOInput2Freq_Value,VCOInput3Freq_Value 223 246 RCC.LPTIM1Freq_Value=100000000 224 247 RCC.LPTIM2Freq_Value=100000000 225 248 RCC.LPTIM345Freq_Value=100000000 226 249 RCC.LPUART1Freq_Value=100000000 227 RCC.LTDCFreq_Value= 100000000250 RCC.LTDCFreq_Value=50000000 228 251 RCC.MCO1PinFreq_Value=64000000 229 252 RCC.MCO2PinFreq_Value=100000000 … … 235 258 RCC.RTCClockSelection=RCC_RTCCLKSOURCE_LSE 236 259 RCC.RTCFreq_Value=32768 237 RCC.SAI1Freq_Value= 100000000238 RCC.SAI4AFreq_Value= 100000000239 RCC.SAI4BFreq_Value= 100000000240 RCC.SDMMCFreq_Value= 100000000241 RCC.SPDIFRXFreq_Value= 100000000242 RCC.SPI123Freq_Value= 100000000243 RCC.SPI45Freq_Value= 30303030.3030303260 RCC.SAI1Freq_Value=50000000 261 RCC.SAI4AFreq_Value=50000000 262 RCC.SAI4BFreq_Value=50000000 263 RCC.SDMMCFreq_Value=50000000 264 RCC.SPDIFRXFreq_Value=50000000 265 RCC.SPI123Freq_Value=50000000 266 RCC.SPI45Freq_Value=25000000 244 267 RCC.SPI6Freq_Value=100000000 245 268 RCC.SWPMI1Freq_Value=100000000 246 269 RCC.SYSCLKFreq_VALUE=100000000 247 270 RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK 248 RCC.Spi45ClockSelection=RCC_SPI45CLKSOURCE_ PLL2271 RCC.Spi45ClockSelection=RCC_SPI45CLKSOURCE_HSE 249 272 RCC.Tim1OutputFreq_Value=100000000 250 273 RCC.Tim2OutputFreq_Value=100000000 … … 252 275 RCC.USART16Freq_Value=100000000 253 276 RCC.USART234578Freq_Value=100000000 254 RCC.USBFreq_Value= 100000000277 RCC.USBFreq_Value=50000000 255 278 RCC.VCO1OutputFreq_Value=200000000 256 279 RCC.VCO2OutputFreq_Value=333333333.3333333 257 RCC.VCO3OutputFreq_Value= 200000000280 RCC.VCO3OutputFreq_Value=100000000 258 281 RCC.VCOInput1Freq_Value=5000000 259 282 RCC.VCOInput2Freq_Value=8333333.333333333 260 RCC.VCOInput3Freq_Value=1000000 283 RCC.VCOInput3Freq_Value=25000000 284 SDMMC1.ClockPowerSave=SDMMC_CLOCK_POWER_SAVE_ENABLE 285 SDMMC1.HardwareFlowControl=SDMMC_HARDWARE_FLOW_CONTROL_ENABLE 286 SDMMC1.IPParameters=ClockPowerSave,HardwareFlowControl 261 287 SPI4.BaudRatePrescaler=SPI_BAUDRATEPRESCALER_4 262 SPI4.CalculateBaudRate= 7.575757MBits/s288 SPI4.CalculateBaudRate=6.25 MBits/s 263 289 SPI4.DataSize=SPI_DATASIZE_9BIT 264 290 SPI4.Direction=SPI_DIRECTION_1LINE
Note: See TracChangeset
for help on using the changeset viewer.