Changeset 51 for ctrl/firmware/Main/CubeMX/Core
- Timestamp:
- Dec 6, 2024, 11:57:29 AM (6 weeks ago)
- Location:
- ctrl/firmware/Main/CubeMX/Core
- Files:
-
- 2 added
- 6 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 */
Note: See TracChangeset
for help on using the changeset viewer.