diff --git a/stm32F030F4_code/.mxproject b/stm32F030F4_code/.mxproject
index 0244974..e72ea4c 100644
--- a/stm32F030F4_code/.mxproject
+++ b/stm32F030F4_code/.mxproject
@@ -9,17 +9,17 @@ CDefines=USE_HAL_DRIVER;STM32F030x6;USE_HAL_DRIVER;USE_HAL_DRIVER;
[PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=3
-HeaderFiles#0=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Inc/stm32f0xx_it.h
-HeaderFiles#1=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Inc/stm32f0xx_hal_conf.h
-HeaderFiles#2=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Inc/main.h
+HeaderFiles#0=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Inc/stm32f0xx_it.h
+HeaderFiles#1=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Inc/stm32f0xx_hal_conf.h
+HeaderFiles#2=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Inc/main.h
HeaderFolderListSize=1
-HeaderPath#0=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Inc
+HeaderPath#0=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Inc
HeaderFiles=;
SourceFileListSize=3
-SourceFiles#0=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Src/stm32f0xx_it.c
-SourceFiles#1=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Src/stm32f0xx_hal_msp.c
-SourceFiles#2=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Src/main.c
+SourceFiles#0=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Src/stm32f0xx_it.c
+SourceFiles#1=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Src/stm32f0xx_hal_msp.c
+SourceFiles#2=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Src/main.c
SourceFolderListSize=1
-SourcePath#0=C:/Users/wuwen/SynologyDrive/1.1project/Morse_code_trainer/stm32F030F4_code/Core/Src
+SourcePath#0=C:/Users/wuwen/Desktop/Morse_code_trainer/stm32F030F4_code/Core/Src
SourceFiles=;
diff --git a/stm32F030F4_code/.settings/language.settings.xml b/stm32F030F4_code/.settings/language.settings.xml
index 75d2bc5..90a581c 100644
--- a/stm32F030F4_code/.settings/language.settings.xml
+++ b/stm32F030F4_code/.settings/language.settings.xml
@@ -6,7 +6,7 @@
-
+
@@ -18,7 +18,7 @@
-
+
diff --git a/stm32F030F4_code/.settings/stm32cubeide.project.prefs b/stm32F030F4_code/.settings/stm32cubeide.project.prefs
index 56ccf4e..f0190c7 100644
--- a/stm32F030F4_code/.settings/stm32cubeide.project.prefs
+++ b/stm32F030F4_code/.settings/stm32cubeide.project.prefs
@@ -1,3 +1,3 @@
-8DF89ED150041C4CBC7CB9A9CAA90856=DE9D7215C49B436EB3F622504203969C
-DC22A860405A8BF2F2C095E5B6529F12=DE9D7215C49B436EB3F622504203969C
+8DF89ED150041C4CBC7CB9A9CAA90856=E28B6841C9F9323141A291719027CE54
+DC22A860405A8BF2F2C095E5B6529F12=E28B6841C9F9323141A291719027CE54
eclipse.preferences.version=1
diff --git a/stm32F030F4_code/Core/Inc/main.h b/stm32F030F4_code/Core/Inc/main.h
index 059e81e..fae94da 100644
--- a/stm32F030F4_code/Core/Inc/main.h
+++ b/stm32F030F4_code/Core/Inc/main.h
@@ -60,6 +60,10 @@ void Error_Handler(void);
/* USER CODE END EFP */
/* Private defines -----------------------------------------------------------*/
+#define tack_A_Pin GPIO_PIN_0
+#define tack_A_GPIO_Port GPIOF
+#define tack_B_Pin GPIO_PIN_1
+#define tack_B_GPIO_Port GPIOF
#define charge_det_Pin GPIO_PIN_1
#define charge_det_GPIO_Port GPIOA
#define buzzer_mute_Pin GPIO_PIN_5
diff --git a/stm32F030F4_code/Core/Src/main.c b/stm32F030F4_code/Core/Src/main.c
index 7a13d3d..92931a5 100644
--- a/stm32F030F4_code/Core/Src/main.c
+++ b/stm32F030F4_code/Core/Src/main.c
@@ -351,12 +351,19 @@ static void MX_GPIO_Init(void)
GPIO_InitTypeDef GPIO_InitStruct = {0};
/* GPIO Ports Clock Enable */
+ __HAL_RCC_GPIOF_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/*Configure GPIO pin Output Level */
HAL_GPIO_WritePin(buzzer_mute_GPIO_Port, buzzer_mute_Pin, GPIO_PIN_RESET);
+ /*Configure GPIO pins : tack_A_Pin tack_B_Pin */
+ GPIO_InitStruct.Pin = tack_A_Pin|tack_B_Pin;
+ GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
+ GPIO_InitStruct.Pull = GPIO_NOPULL;
+ HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
+
/*Configure GPIO pin : charge_det_Pin */
GPIO_InitStruct.Pin = charge_det_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
diff --git a/stm32F030F4_code/stm32F030F4_code.ioc b/stm32F030F4_code/stm32F030F4_code.ioc
index 1cf8c66..b99d395 100644
--- a/stm32F030F4_code/stm32F030F4_code.ioc
+++ b/stm32F030F4_code/stm32F030F4_code.ioc
@@ -2,6 +2,7 @@
File.Version=6
GPIO.groupedBy=
KeepUserPlacement=false
+Mcu.CPN=STM32F030F4P6
Mcu.Family=STM32F0
Mcu.IP0=ADC
Mcu.IP1=I2C1
@@ -13,33 +14,35 @@ Mcu.IP6=USART1
Mcu.IPNb=7
Mcu.Name=STM32F030F4Px
Mcu.Package=TSSOP20
-Mcu.Pin0=PA0
-Mcu.Pin1=PA1
-Mcu.Pin10=PA10
-Mcu.Pin11=PA13
-Mcu.Pin12=PA14
-Mcu.Pin13=VP_SYS_VS_Systick
-Mcu.Pin14=VP_TIM14_VS_ClockSourceINT
-Mcu.Pin2=PA2
-Mcu.Pin3=PA3
-Mcu.Pin4=PA4
-Mcu.Pin5=PA5
-Mcu.Pin6=PA6
-Mcu.Pin7=PA7
-Mcu.Pin8=PB1
-Mcu.Pin9=PA9
-Mcu.PinsNb=15
+Mcu.Pin0=PF0-OSC_IN
+Mcu.Pin1=PF1-OSC_OUT
+Mcu.Pin10=PB1
+Mcu.Pin11=PA9
+Mcu.Pin12=PA10
+Mcu.Pin13=PA13
+Mcu.Pin14=PA14
+Mcu.Pin15=VP_SYS_VS_Systick
+Mcu.Pin16=VP_TIM14_VS_ClockSourceINT
+Mcu.Pin2=PA0
+Mcu.Pin3=PA1
+Mcu.Pin4=PA2
+Mcu.Pin5=PA3
+Mcu.Pin6=PA4
+Mcu.Pin7=PA5
+Mcu.Pin8=PA6
+Mcu.Pin9=PA7
+Mcu.PinsNb=17
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F030F4Px
MxCube.Version=6.3.0
MxDb.Version=DB.6.0.30
NVIC.ForceEnableDMAVector=true
-NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false
-NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false
-NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false
-NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false
-NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true
+NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
+NVIC.NonMaskableInt_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
+NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
+NVIC.SVC_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
+NVIC.SysTick_IRQn=true\:3\:0\:false\:false\:true\:false\:true\:true
PA0.Mode=IN0
PA0.Signal=ADC_IN0
PA1.GPIOParameters=GPIO_Label
@@ -76,6 +79,14 @@ PB1.GPIOParameters=GPIO_Label
PB1.GPIO_Label=SW_C
PB1.Locked=true
PB1.Signal=GPXTI1
+PF0-OSC_IN.GPIOParameters=GPIO_Label
+PF0-OSC_IN.GPIO_Label=tack_A
+PF0-OSC_IN.Locked=true
+PF0-OSC_IN.Signal=GPIO_Input
+PF1-OSC_OUT.GPIOParameters=GPIO_Label
+PF1-OSC_OUT.GPIO_Label=tack_B
+PF1-OSC_OUT.Locked=true
+PF1-OSC_OUT.Signal=GPIO_Input
PinOutPanel.RotationAngle=0
ProjectManager.AskForMigrate=true
ProjectManager.BackupPrevious=false
@@ -104,7 +115,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=true
-ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true
+ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_ADC_Init-ADC-false-HAL-true,4-MX_I2C1_Init-I2C1-false-HAL-true,5-MX_TIM14_Init-TIM14-false-HAL-true,6-MX_USART1_UART_Init-USART1-false-HAL-true
RCC.AHBFreq_Value=48000000
RCC.APB1Freq_Value=48000000
RCC.APB1TimFreq_Value=48000000