Parcourir la source

BOOT LED 추가 / 타이밍 변경

YJ il y a 6 ans
Parent
commit
0989b48dd2

Fichier diff supprimé car celui-ci est trop grand
+ 198 - 198
.cproject


BIN
Debug/STM32F103_ATTEN_PLL_Zig.elf


Fichier diff supprimé car celui-ci est trop grand
+ 663 - 658
Debug/STM32F103_ATTEN_PLL_Zig.hex


Fichier diff supprimé car celui-ci est trop grand
+ 4169 - 4098
Debug/STM32F103_ATTEN_PLL_Zig.list


Fichier diff supprimé car celui-ci est trop grand
+ 409 - 408
Debug/STM32F103_ATTEN_PLL_Zig.map


BIN
Debug/Src/main.o


+ 3 - 3
Debug/Src/main.su

@@ -1,5 +1,5 @@
1 1
 main.c:70:6:HAL_TIM_PeriodElapsedCallback	0	static
2 2
 main.c:79:5:_write	8	static
3
-main.c:151:6:SystemClock_Config	72	static
4
-main.c:91:5:main	32	static
5
-main.c:313:6:Error_Handler	0	static
3
+main.c:152:6:SystemClock_Config	72	static
4
+main.c:91:5:main	40	static
5
+main.c:325:6:Error_Handler	0	static

+ 2 - 0
Inc/main.h

@@ -63,6 +63,8 @@ void Error_Handler(void);
63 63
 /* USER CODE END EFP */
64 64
 
65 65
 /* Private defines -----------------------------------------------------------*/
66
+#define BOOT_LED_Pin GPIO_PIN_14
67
+#define BOOT_LED_GPIO_Port GPIOG
66 68
 /* USER CODE BEGIN Private defines */
67 69
 
68 70
 /* USER CODE END Private defines */

+ 9 - 4
STM32F103_ATTEN_PLL_Zig.ioc

@@ -25,10 +25,11 @@ Mcu.Package=LQFP144
25 25
 Mcu.Pin0=PA9
26 26
 Mcu.Pin1=PA10
27 27
 Mcu.Pin2=PA15
28
-Mcu.Pin3=VP_SYS_VS_ND
29
-Mcu.Pin4=VP_SYS_VS_Systick
30
-Mcu.Pin5=VP_TIM6_VS_ClockSourceINT
31
-Mcu.PinsNb=6
28
+Mcu.Pin3=PG14
29
+Mcu.Pin4=VP_SYS_VS_ND
30
+Mcu.Pin5=VP_SYS_VS_Systick
31
+Mcu.Pin6=VP_TIM6_VS_ClockSourceINT
32
+Mcu.PinsNb=7
32 33
 Mcu.ThirdPartyNb=0
33 34
 Mcu.UserConstants=
34 35
 Mcu.UserName=STM32F103ZETx
@@ -61,6 +62,10 @@ PCC.Seq0=0
61 62
 PCC.Series=STM32F1
62 63
 PCC.Temperature=25
63 64
 PCC.Vdd=3.3
65
+PG14.GPIOParameters=GPIO_Label
66
+PG14.GPIO_Label=BOOT_LED
67
+PG14.Locked=true
68
+PG14.Signal=GPIO_Output
64 69
 PinOutPanel.RotationAngle=0
65 70
 ProjectManager.AskForMigrate=true
66 71
 ProjectManager.BackupPrevious=false

+ 14 - 2
Src/main.c

@@ -133,8 +133,9 @@ int main(void)
133 133
   while (1)
134 134
   {
135 135
 	 // printf("Uart Start \r\n");
136
-	  while (TerminalQueue.data > 0 && UartTimerCnt > 1500) GetDataFromUartQueue(&hTerminal);
137
-      while(FirmwareTimerCnt > 100000)  Jump_App();
136
+	  if(LedTimerCnt > 500){HAL_GPIO_TogglePin(BOOT_LED_GPIO_Port,GPIO_PIN_14);LedTimerCnt = 0;}
137
+	  while (TerminalQueue.data > 0 && UartTimerCnt > 100) GetDataFromUartQueue(&hTerminal);
138
+      while(FirmwareTimerCnt > 3000)  Jump_App();
138 139
 
139 140
 	  //HAL_Delay(500);
140 141
     /* USER CODE END WHILE */
@@ -289,10 +290,14 @@ static void MX_GPIO_Init(void)
289 290
 
290 291
   /* GPIO Ports Clock Enable */
291 292
   __HAL_RCC_GPIOA_CLK_ENABLE();
293
+  __HAL_RCC_GPIOG_CLK_ENABLE();
292 294
 
293 295
   /*Configure GPIO pin Output Level */
294 296
   HAL_GPIO_WritePin(GPIOA, GPIO_PIN_15, GPIO_PIN_RESET);
295 297
 
298
+  /*Configure GPIO pin Output Level */
299
+  HAL_GPIO_WritePin(BOOT_LED_GPIO_Port, BOOT_LED_Pin, GPIO_PIN_RESET);
300
+
296 301
   /*Configure GPIO pin : PA15 */
297 302
   GPIO_InitStruct.Pin = GPIO_PIN_15;
298 303
   GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
@@ -300,6 +305,13 @@ static void MX_GPIO_Init(void)
300 305
   GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
301 306
   HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
302 307
 
308
+  /*Configure GPIO pin : BOOT_LED_Pin */
309
+  GPIO_InitStruct.Pin = BOOT_LED_Pin;
310
+  GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
311
+  GPIO_InitStruct.Pull = GPIO_NOPULL;
312
+  GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
313
+  HAL_GPIO_Init(BOOT_LED_GPIO_Port, &GPIO_InitStruct);
314
+
303 315
 }
304 316
 
305 317
 /* USER CODE BEGIN 4 */