Changeset 54 for ctrl/firmware/Main/CubeMX/Core/Src
- Timestamp:
- Dec 10, 2024, 11:42:57 AM (5 weeks ago)
- Location:
- ctrl/firmware/Main/CubeMX/Core/Src
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/CubeMX/Core/Src/gpio.c
r51 r54 108 108 /*Configure GPIO pins : PA0 PA1 PA2 PA3 109 109 PA4 PA5 PA6 PA7 110 PA 8 PA9 PA10 PA11111 PA1 2 PA15 */110 PA9 PA10 PA11 PA12 111 PA15 */ 112 112 GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3 113 113 |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7 114 |GPIO_PIN_ 8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11115 |GPIO_PIN_1 2|GPIO_PIN_15;114 |GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12 115 |GPIO_PIN_15; 116 116 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; 117 117 GPIO_InitStruct.Pull = GPIO_NOPULL; … … 152 152 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 153 153 154 /*Configure GPIO pin : SD_DETECT_Pin */ 155 GPIO_InitStruct.Pin = SD_DETECT_Pin; 156 GPIO_InitStruct.Mode = GPIO_MODE_INPUT; 157 GPIO_InitStruct.Pull = GPIO_PULLDOWN; 158 HAL_GPIO_Init(SD_DETECT_GPIO_Port, &GPIO_InitStruct); 159 154 160 /*Configure GPIO pin : OUTPUT_ON_LED_Pin */ 155 161 GPIO_InitStruct.Pin = OUTPUT_ON_LED_Pin; -
ctrl/firmware/Main/CubeMX/Core/Src/main.c
r51 r54 18 18 /* USER CODE END Header */ 19 19 /* Includes ------------------------------------------------------------------*/ 20 #include "app_threadx.h" 20 21 #include "main.h" 21 22 #include "dma.h" … … 118 119 /* USER CODE BEGIN 2 */ 119 120 120 //HAL_GPIO_WritePin(PWM_DISPLAY_LIGHT_GPIO_Port, PWM_DISPLAY_LIGHT_Pin, GPIO_PIN_SET);121 //HAL_GPIO_WritePin(TX1_LED_GPIO_Port, TX1_LED_Pin, GPIO_PIN_SET);122 //HAL_GPIO_WritePin(RX1_LED_GPIO_Port, RX1_LED_Pin, GPIO_PIN_SET);123 //HAL_GPIO_WritePin(OUTPUT_ON_LED_GPIO_Port, OUTPUT_ON_LED_Pin, GPIO_PIN_RESET);124 125 126 121 /* USER CODE END 2 */ 122 123 MX_ThreadX_Init(); 124 125 /* We should never get here as control is now taken by the scheduler */ 127 126 128 127 /* Infinite loop */ … … 260 259 261 260 /** 261 * @brief Period elapsed callback in non blocking mode 262 * @note This function is called when TIM7 interrupt took place, inside 263 * HAL_TIM_IRQHandler(). It makes a direct call to HAL_IncTick() to increment 264 * a global variable "uwTick" used as application time base. 265 * @param htim : TIM handle 266 * @retval None 267 */ 268 void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim) 269 { 270 /* USER CODE BEGIN Callback 0 */ 271 272 /* USER CODE END Callback 0 */ 273 if (htim->Instance == TIM7) { 274 HAL_IncTick(); 275 } 276 /* USER CODE BEGIN Callback 1 */ 277 278 /* USER CODE END Callback 1 */ 279 } 280 281 /** 262 282 * @brief This function is executed in case of error occurrence. 263 283 * @retval None -
ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c
r51 r54 59 59 extern DMA_HandleTypeDef hdma_spi4_tx; 60 60 extern SPI_HandleTypeDef hspi4; 61 extern TIM_HandleTypeDef htim7; 62 61 63 /* USER CODE BEGIN EV */ 62 64 … … 142 144 143 145 /** 144 * @brief This function handles System service call via SWI instruction.145 */146 void SVC_Handler(void)147 {148 /* USER CODE BEGIN SVCall_IRQn 0 */149 150 /* USER CODE END SVCall_IRQn 0 */151 /* USER CODE BEGIN SVCall_IRQn 1 */152 153 /* USER CODE END SVCall_IRQn 1 */154 }155 156 /**157 146 * @brief This function handles Debug monitor. 158 147 */ … … 165 154 166 155 /* USER CODE END DebugMonitor_IRQn 1 */ 167 }168 169 /**170 * @brief This function handles Pendable request for system service.171 */172 void PendSV_Handler(void)173 {174 /* USER CODE BEGIN PendSV_IRQn 0 */175 176 /* USER CODE END PendSV_IRQn 0 */177 /* USER CODE BEGIN PendSV_IRQn 1 */178 179 /* USER CODE END PendSV_IRQn 1 */180 }181 182 /**183 * @brief This function handles System tick timer.184 */185 void SysTick_Handler(void)186 {187 /* USER CODE BEGIN SysTick_IRQn 0 */188 189 /* USER CODE END SysTick_IRQn 0 */190 HAL_IncTick();191 /* USER CODE BEGIN SysTick_IRQn 1 */192 193 /* USER CODE END SysTick_IRQn 1 */194 156 } 195 157 … … 230 192 231 193 /** 194 * @brief This function handles TIM7 global interrupt. 195 */ 196 void TIM7_IRQHandler(void) 197 { 198 /* USER CODE BEGIN TIM7_IRQn 0 */ 199 200 /* USER CODE END TIM7_IRQn 0 */ 201 HAL_TIM_IRQHandler(&htim7); 202 /* USER CODE BEGIN TIM7_IRQn 1 */ 203 204 /* USER CODE END TIM7_IRQn 1 */ 205 } 206 207 /** 232 208 * @brief This function handles SPI4 global interrupt. 233 209 */
Note: See TracChangeset
for help on using the changeset viewer.