Dmitry Yu Okunev 5 years ago
parent
commit
a36d2973c3
5 changed files with 21 additions and 16 deletions
  1. 3 0
      firmware/.gdbcommands
  2. 1 1
      firmware/.mxproject
  3. 1 1
      firmware/Src/main.c
  4. 6 6
      firmware/Src/stm32f0xx_hal_msp.c
  5. 10 8
      firmware/firmware.ioc

+ 3 - 0
firmware/.gdbcommands

@@ -0,0 +1,3 @@
+target remote :4242
+load
+continue

File diff suppressed because it is too large
+ 1 - 1
firmware/.mxproject


+ 1 - 1
firmware/Src/main.c

@@ -63,7 +63,7 @@ void HAL_Delay_my(uint32_t msec)
 {
 	while (msec--) {
 		volatile int i;
-		i=0; while(i++ < 350);
+		i=0; while(i++ < 1550);
 	}
 }
 

+ 6 - 6
firmware/Src/stm32f0xx_hal_msp.c

@@ -75,10 +75,10 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
     __HAL_RCC_USART1_CLK_ENABLE();
   
     /**USART1 GPIO Configuration    
-    PA2     ------> USART1_TX
-    PA3     ------> USART1_RX 
+    PA9     ------> USART1_TX
+    PA10     ------> USART1_RX 
     */
-    GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
+    GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
     GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_PULLUP;
     GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
@@ -104,10 +104,10 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
     __HAL_RCC_USART1_CLK_DISABLE();
   
     /**USART1 GPIO Configuration    
-    PA2     ------> USART1_TX
-    PA3     ------> USART1_RX 
+    PA9     ------> USART1_TX
+    PA10     ------> USART1_RX 
     */
-    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3);
+    HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
 
   }
   /* USER CODE BEGIN USART1_MspDeInit 1 */

+ 10 - 8
firmware/firmware.ioc

@@ -12,9 +12,9 @@ Mcu.Package=TSSOP20
 Mcu.Pin0=PF0-OSC_IN
 Mcu.Pin1=PF1-OSC_OUT
 Mcu.Pin2=PA0
-Mcu.Pin3=PA2
-Mcu.Pin4=PA3
-Mcu.Pin5=PA4
+Mcu.Pin3=PA4
+Mcu.Pin4=PA9
+Mcu.Pin5=PA10
 Mcu.Pin6=PA13
 Mcu.Pin7=PA14
 Mcu.Pin8=VP_SYS_VS_Systick
@@ -32,18 +32,20 @@ PA0.GPIOParameters=GPIO_Label
 PA0.GPIO_Label=LED1
 PA0.Locked=true
 PA0.Signal=GPIO_Output
+PA10.Locked=true
+PA10.Mode=Asynchronous
+PA10.Signal=USART1_RX
 PA13.Mode=Serial_Wire
 PA13.Signal=SYS_SWDIO
 PA14.Mode=Serial_Wire
 PA14.Signal=SYS_SWCLK
-PA2.Mode=Asynchronous
-PA2.Signal=USART1_TX
-PA3.Mode=Asynchronous
-PA3.Signal=USART1_RX
 PA4.GPIOParameters=GPIO_Label
 PA4.GPIO_Label=ENABLE_RS232
 PA4.Locked=true
 PA4.Signal=GPIO_Output
+PA9.Locked=true
+PA9.Mode=Asynchronous
+PA9.Signal=USART1_TX
 PCC.Checker=false
 PCC.Line=STM32F0x0 Value Line
 PCC.MCU=STM32F030F4Px
@@ -62,7 +64,7 @@ ProjectManager.BackupPrevious=false
 ProjectManager.CompilerOptimize=2
 ProjectManager.ComputerToolchain=false
 ProjectManager.CoupleFile=false
-ProjectManager.CustomerFirmwarePackage=/home/xaionaro/STM32Cube/Repository/STM32Cube_FW_F0_V1.7.0
+ProjectManager.CustomerFirmwarePackage=
 ProjectManager.DefaultFWLocation=true
 ProjectManager.DeletePrevious=true
 ProjectManager.DeviceId=STM32F030F4Px