Changeset 63 for ctrl/firmware/Main/CubeMX
- Timestamp:
- Jan 15, 2025, 10:01:55 AM (15 hours ago)
- Location:
- ctrl/firmware/Main/CubeMX
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
ctrl/firmware/Main/CubeMX/Core/Inc/stm32h7xx_it.h
r54 r63 54 54 void DebugMon_Handler(void); 55 55 void DMA1_Stream0_IRQHandler(void); 56 void USART3_IRQHandler(void); 56 57 void SDMMC1_IRQHandler(void); 57 58 void TIM7_IRQHandler(void); -
ctrl/firmware/Main/CubeMX/Core/Src/gpio.c
r62 r63 156 156 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 157 157 158 /*Configure GPIO pins : PD11 PD12 PD14 PD15159 PD0 PD1 PD3 PD4160 PD5 PD6 */161 GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_14|GPIO_PIN_15162 |GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_3|GPIO_PIN_4163 |GPIO_PIN_5|GPIO_PIN_6;164 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;165 GPIO_InitStruct.Pull = GPIO_NOPULL;166 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);167 168 158 /*Configure GPIO pin : GSM_STATUS_Pin */ 169 159 GPIO_InitStruct.Pin = GSM_STATUS_Pin; … … 171 161 GPIO_InitStruct.Pull = GPIO_NOPULL; 172 162 HAL_GPIO_Init(GSM_STATUS_GPIO_Port, &GPIO_InitStruct); 163 164 /*Configure GPIO pins : PD14 PD15 PD0 PD1 165 PD3 PD4 PD5 PD6 */ 166 GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1 167 |GPIO_PIN_3|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6; 168 GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; 169 GPIO_InitStruct.Pull = GPIO_NOPULL; 170 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 173 171 174 172 /*Configure GPIO pins : PG2 PG3 PG4 PG5 -
ctrl/firmware/Main/CubeMX/Core/Src/stm32h7xx_it.c
r54 r63 23 23 /* Private includes ----------------------------------------------------------*/ 24 24 /* USER CODE BEGIN Includes */ 25 26 #include "gsm_thread.h" 27 25 28 /* USER CODE END Includes */ 26 29 … … 59 62 extern DMA_HandleTypeDef hdma_spi4_tx; 60 63 extern SPI_HandleTypeDef hspi4; 64 extern UART_HandleTypeDef huart3; 61 65 extern TIM_HandleTypeDef htim7; 62 66 … … 178 182 179 183 /** 184 * @brief This function handles USART3 global interrupt. 185 */ 186 void USART3_IRQHandler(void) 187 { 188 /* USER CODE BEGIN USART3_IRQn 0 */ 189 190 /* USER CODE END USART3_IRQn 0 */ 191 HAL_UART_IRQHandler(&huart3); 192 /* USER CODE BEGIN USART3_IRQn 1 */ 193 194 /* USER CODE END USART3_IRQn 1 */ 195 } 196 197 /** 180 198 * @brief This function handles SDMMC1 global interrupt. 181 199 */ … … 221 239 /* USER CODE BEGIN 1 */ 222 240 241 void HAL_UART_RxCpltCallback(UART_HandleTypeDef * huart) 242 { 243 if (huart->Instance == USART3) gsmUnitSentData(); 244 } 245 246 //------------------------------------------------------------------------------ 247 223 248 /* USER CODE END 1 */ -
ctrl/firmware/Main/CubeMX/Core/Src/usart.c
r61 r63 49 49 huart3.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; 50 50 huart3.Init.ClockPrescaler = UART_PRESCALER_DIV1; 51 huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; 51 huart3.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_SWAP_INIT|UART_ADVFEATURE_DMADISABLEONERROR_INIT; 52 huart3.AdvancedInit.Swap = UART_ADVFEATURE_SWAP_ENABLE; 53 huart3.AdvancedInit.DMADisableonRxError = UART_ADVFEATURE_DMA_DISABLEONRXERROR; 52 54 if (HAL_UART_Init(&huart3) != HAL_OK) 53 55 { … … 107 109 PD8 ------> USART3_TX 108 110 PD9 ------> USART3_RX 111 PD11 ------> USART3_CTS 112 PD12 ------> USART3_RTS 109 113 */ 110 GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9 ;114 GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_11|GPIO_PIN_12; 111 115 GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; 112 116 GPIO_InitStruct.Pull = GPIO_NOPULL; … … 115 119 HAL_GPIO_Init(GPIOD, &GPIO_InitStruct); 116 120 121 /* USART3 interrupt Init */ 122 HAL_NVIC_SetPriority(USART3_IRQn, 0, 0); 123 HAL_NVIC_EnableIRQ(USART3_IRQn); 117 124 /* USER CODE BEGIN USART3_MspInit 1 */ 118 125 … … 135 142 PD8 ------> USART3_TX 136 143 PD9 ------> USART3_RX 144 PD11 ------> USART3_CTS 145 PD12 ------> USART3_RTS 137 146 */ 138 HAL_GPIO_DeInit(GPIOD, GPIO_PIN_8|GPIO_PIN_9 );147 HAL_GPIO_DeInit(GPIOD, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_11|GPIO_PIN_12); 139 148 149 /* USART3 interrupt Deinit */ 150 HAL_NVIC_DisableIRQ(USART3_IRQn); 140 151 /* USER CODE BEGIN USART3_MspDeInit 1 */ 141 152 -
ctrl/firmware/Main/CubeMX/charger.ioc
r62 r63 57 57 Mcu.Pin15=PD9 58 58 Mcu.Pin16=PD10 59 Mcu.Pin17=PD1 360 Mcu.Pin18=P C861 Mcu.Pin19=P C959 Mcu.Pin17=PD11 60 Mcu.Pin18=PD12 61 Mcu.Pin19=PD13 62 62 Mcu.Pin2=PC15-OSC32_OUT 63 Mcu.Pin20=P A864 Mcu.Pin21=P A13(JTMS/SWDIO)65 Mcu.Pin22=PA 14(JTCK/SWCLK)66 Mcu.Pin23=P C1067 Mcu.Pin24=P C1168 Mcu.Pin25=PC1 269 Mcu.Pin26=P D270 Mcu.Pin27=P D771 Mcu.Pin28=P G972 Mcu.Pin29=P G1063 Mcu.Pin20=PC8 64 Mcu.Pin21=PC9 65 Mcu.Pin22=PA8 66 Mcu.Pin23=PA13(JTMS/SWDIO) 67 Mcu.Pin24=PA14(JTCK/SWCLK) 68 Mcu.Pin25=PC10 69 Mcu.Pin26=PC11 70 Mcu.Pin27=PC12 71 Mcu.Pin28=PD2 72 Mcu.Pin29=PD7 73 73 Mcu.Pin3=PH0-OSC_IN 74 Mcu.Pin30=PG 1175 Mcu.Pin31=PG1 276 Mcu.Pin32=PG1 377 Mcu.Pin33=PG1 578 Mcu.Pin34= VP_RTC_VS_RTC_Activate79 Mcu.Pin35= VP_SYS_VS_tim780 Mcu.Pin36=VP_ MEMORYMAP_VS_MEMORYMAP81 Mcu.Pin37=VP_S TMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.082 Mcu.Pin38=VP_ STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.083 Mcu.Pin39=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_ FileOoSystemJjInterfaces_3.3.0_3.3.074 Mcu.Pin30=PG9 75 Mcu.Pin31=PG10 76 Mcu.Pin32=PG11 77 Mcu.Pin33=PG12 78 Mcu.Pin34=PG13 79 Mcu.Pin35=PG15 80 Mcu.Pin36=VP_RTC_VS_RTC_Activate 81 Mcu.Pin37=VP_SYS_VS_tim7 82 Mcu.Pin38=VP_MEMORYMAP_VS_MEMORYMAP 83 Mcu.Pin39=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_RTOSJjThreadX_6.4.0_3.3.0 84 84 Mcu.Pin4=PH1-OSC_OUT 85 Mcu.Pin40=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjFileX_6.4.0_3.3.0 86 Mcu.Pin41=VP_STMicroelectronics.X-CUBE-AZRTOS-H7_VS_FileOoSystemJjInterfaces_3.3.0_3.3.0 85 87 Mcu.Pin5=PF15 86 88 Mcu.Pin6=PG0 … … 88 90 Mcu.Pin8=PE7 89 91 Mcu.Pin9=PE11 90 Mcu.PinsNb=4 092 Mcu.PinsNb=42 91 93 Mcu.ThirdParty0=STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0 92 94 Mcu.ThirdPartyNb=1 … … 114 116 NVIC.TimeBase=TIM7_IRQn 115 117 NVIC.TimeBaseIP=TIM7 118 NVIC.USART3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true\:true 116 119 NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false 117 120 PA13(JTMS/SWDIO).Mode=Serial_Wire … … 143 146 PD10.Locked=true 144 147 PD10.Signal=GPIO_Output 148 PD11.Locked=true 149 PD11.Signal=USART3_CTS 150 PD12.Locked=true 151 PD12.Signal=USART3_RTS 145 152 PD13.GPIOParameters=GPIO_Label 146 153 PD13.GPIO_Label=GSM_STATUS … … 378 385 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_IsAnAzureRtosMw=true 379 386 STMicroelectronics.X-CUBE-AZRTOS-H7.3.3.0_SwParameter=InterfacesCcFileOoSystemJjFileXOoSDOointerface\:true;ThreadXCcRTOSJjThreadXJjLowOoPowerOosupport\:true;FileXCcFileOoSystemJjFileXJjCore\:true;ThreadXCcRTOSJjThreadXJjCore\:true; 380 USART3.IPParameters=VirtualMode-Asynchronous 387 USART3.DMADisableonRxErrorParam=ADVFEATURE_DMA_DISABLEONRXERROR 388 USART3.IPParameters=VirtualMode-Asynchronous,SwapParam,DMADisableonRxErrorParam 389 USART3.SwapParam=ADVFEATURE_SWAP_ENABLE 381 390 USART3.VirtualMode-Asynchronous=VM_ASYNC 382 391 VP_MEMORYMAP_VS_MEMORYMAP.Mode=CurAppReg
Note: See TracChangeset
for help on using the changeset viewer.