输入方式改成中断,开启了两个定时器

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2022-05-01 11:46:10 +08:00
parent de69c38b1f
commit 6e8fd579b8
67 changed files with 2869 additions and 3022 deletions
+8 -8
View File
@@ -9,17 +9,17 @@ CDefines=USE_HAL_DRIVER;STM32F103xB;USE_HAL_DRIVER;USE_HAL_DRIVER;
[PreviousGenFiles]
AdvancedFolderStructure=true
HeaderFileListSize=3
HeaderFiles#0=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Inc/stm32f1xx_it.h
HeaderFiles#1=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Inc/stm32f1xx_hal_conf.h
HeaderFiles#2=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Inc/main.h
HeaderFiles#0=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Inc/stm32f1xx_it.h
HeaderFiles#1=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Inc/stm32f1xx_hal_conf.h
HeaderFiles#2=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Inc/main.h
HeaderFolderListSize=1
HeaderPath#0=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Inc
HeaderPath#0=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Inc
HeaderFiles=;
SourceFileListSize=3
SourceFiles#0=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Src/stm32f1xx_it.c
SourceFiles#1=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Src/stm32f1xx_hal_msp.c
SourceFiles#2=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Src/main.c
SourceFiles#0=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Src/stm32f1xx_it.c
SourceFiles#1=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Src/stm32f1xx_hal_msp.c
SourceFiles#2=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Src/main.c
SourceFolderListSize=1
SourcePath#0=C:/Users/kevin/Desktop/morse_code_trainer/f103c8t6_keil/Core/Src
SourcePath#0=C:/Users/wuwen/morse_code_trainer/f103c8t6_keil/Core/Src
SourceFiles=;
+2
View File
@@ -63,8 +63,10 @@ void Error_Handler(void);
#define mute_GPIO_Port GPIOA
#define tack_a_Pin GPIO_PIN_0
#define tack_a_GPIO_Port GPIOB
#define tack_a_EXTI_IRQn EXTI0_IRQn
#define tack_b_Pin GPIO_PIN_1
#define tack_b_GPIO_Port GPIOB
#define tack_b_EXTI_IRQn EXTI1_IRQn
#define run_led2_Pin GPIO_PIN_12
#define run_led2_GPIO_Port GPIOB
#define run_led_Pin GPIO_PIN_15
+3
View File
@@ -55,8 +55,11 @@ void SVC_Handler(void);
void DebugMon_Handler(void);
void PendSV_Handler(void);
void SysTick_Handler(void);
void EXTI0_IRQHandler(void);
void EXTI1_IRQHandler(void);
void EXTI4_IRQHandler(void);
void TIM2_IRQHandler(void);
void TIM3_IRQHandler(void);
/* USER CODE BEGIN EFP */
/* USER CODE END EFP */
+63 -3
View File
@@ -42,6 +42,7 @@
I2C_HandleTypeDef hi2c1;
TIM_HandleTypeDef htim2;
TIM_HandleTypeDef htim3;
/* USER CODE BEGIN PV */
@@ -52,6 +53,7 @@ void SystemClock_Config(void);
static void MX_GPIO_Init(void);
static void MX_I2C1_Init(void);
static void MX_TIM2_Init(void);
static void MX_TIM3_Init(void);
/* USER CODE BEGIN PFP */
/* USER CODE END PFP */
@@ -91,6 +93,7 @@ int main(void)
MX_GPIO_Init();
MX_I2C1_Init();
MX_TIM2_Init();
MX_TIM3_Init();
/* USER CODE BEGIN 2 */
mymain();
/* USER CODE END 2 */
@@ -238,6 +241,51 @@ static void MX_TIM2_Init(void)
}
/**
* @brief TIM3 Initialization Function
* @param None
* @retval None
*/
static void MX_TIM3_Init(void)
{
/* USER CODE BEGIN TIM3_Init 0 */
/* USER CODE END TIM3_Init 0 */
TIM_ClockConfigTypeDef sClockSourceConfig = {0};
TIM_MasterConfigTypeDef sMasterConfig = {0};
/* USER CODE BEGIN TIM3_Init 1 */
/* USER CODE END TIM3_Init 1 */
htim3.Instance = TIM3;
htim3.Init.Prescaler = 72-1;
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 1000-1;
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
{
Error_Handler();
}
sClockSourceConfig.ClockSource = TIM_CLOCKSOURCE_INTERNAL;
if (HAL_TIM_ConfigClockSource(&htim3, &sClockSourceConfig) != HAL_OK)
{
Error_Handler();
}
sMasterConfig.MasterOutputTrigger = TIM_TRGO_RESET;
sMasterConfig.MasterSlaveMode = TIM_MASTERSLAVEMODE_DISABLE;
if (HAL_TIMEx_MasterConfigSynchronization(&htim3, &sMasterConfig) != HAL_OK)
{
Error_Handler();
}
/* USER CODE BEGIN TIM3_Init 2 */
/* USER CODE END TIM3_Init 2 */
}
/**
* @brief GPIO Initialization Function
* @param None
@@ -269,9 +317,9 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(mute_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : tack_a_Pin tack_b_Pin en_c_Pin en_b_Pin */
GPIO_InitStruct.Pin = tack_a_Pin|tack_b_Pin|en_c_Pin|en_b_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
/*Configure GPIO pins : tack_a_Pin tack_b_Pin */
GPIO_InitStruct.Pin = tack_a_Pin|tack_b_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING_FALLING;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
@@ -289,6 +337,12 @@ static void MX_GPIO_Init(void)
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH;
HAL_GPIO_Init(run_led_GPIO_Port, &GPIO_InitStruct);
/*Configure GPIO pins : en_c_Pin en_b_Pin */
GPIO_InitStruct.Pin = en_c_Pin|en_b_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
GPIO_InitStruct.Pull = GPIO_PULLUP;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
/*Configure GPIO pin : en_a_Pin */
GPIO_InitStruct.Pin = en_a_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING;
@@ -296,6 +350,12 @@ static void MX_GPIO_Init(void)
HAL_GPIO_Init(en_a_GPIO_Port, &GPIO_InitStruct);
/* EXTI interrupt init*/
HAL_NVIC_SetPriority(EXTI0_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI0_IRQn);
HAL_NVIC_SetPriority(EXTI1_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI1_IRQn);
HAL_NVIC_SetPriority(EXTI4_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(EXTI4_IRQn);
@@ -169,6 +169,20 @@ void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
/* USER CODE END TIM2_MspInit 1 */
}
else if(htim_base->Instance==TIM3)
{
/* USER CODE BEGIN TIM3_MspInit 0 */
/* USER CODE END TIM3_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_TIM3_CLK_ENABLE();
/* TIM3 interrupt Init */
HAL_NVIC_SetPriority(TIM3_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TIM3_IRQn);
/* USER CODE BEGIN TIM3_MspInit 1 */
/* USER CODE END TIM3_MspInit 1 */
}
}
@@ -218,6 +232,20 @@ void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
/* USER CODE END TIM2_MspDeInit 1 */
}
else if(htim_base->Instance==TIM3)
{
/* USER CODE BEGIN TIM3_MspDeInit 0 */
/* USER CODE END TIM3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_TIM3_CLK_DISABLE();
/* TIM3 interrupt DeInit */
HAL_NVIC_DisableIRQ(TIM3_IRQn);
/* USER CODE BEGIN TIM3_MspDeInit 1 */
/* USER CODE END TIM3_MspDeInit 1 */
}
}
+43
View File
@@ -56,6 +56,7 @@
/* External variables --------------------------------------------------------*/
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim3;
/* USER CODE BEGIN EV */
/* USER CODE END EV */
@@ -198,6 +199,34 @@ void SysTick_Handler(void)
/* please refer to the startup file (startup_stm32f1xx.s). */
/******************************************************************************/
/**
* @brief This function handles EXTI line0 interrupt.
*/
void EXTI0_IRQHandler(void)
{
/* USER CODE BEGIN EXTI0_IRQn 0 */
/* USER CODE END EXTI0_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(tack_a_Pin);
/* USER CODE BEGIN EXTI0_IRQn 1 */
/* USER CODE END EXTI0_IRQn 1 */
}
/**
* @brief This function handles EXTI line1 interrupt.
*/
void EXTI1_IRQHandler(void)
{
/* USER CODE BEGIN EXTI1_IRQn 0 */
/* USER CODE END EXTI1_IRQn 0 */
HAL_GPIO_EXTI_IRQHandler(tack_b_Pin);
/* USER CODE BEGIN EXTI1_IRQn 1 */
/* USER CODE END EXTI1_IRQn 1 */
}
/**
* @brief This function handles EXTI line4 interrupt.
*/
@@ -226,6 +255,20 @@ void TIM2_IRQHandler(void)
/* USER CODE END TIM2_IRQn 1 */
}
/**
* @brief This function handles TIM3 global interrupt.
*/
void TIM3_IRQHandler(void)
{
/* USER CODE BEGIN TIM3_IRQn 0 */
/* USER CODE END TIM3_IRQn 0 */
HAL_TIM_IRQHandler(&htim3);
/* USER CODE BEGIN TIM3_IRQn 1 */
/* USER CODE END TIM3_IRQn 1 */
}
/* USER CODE BEGIN 1 */
/* USER CODE END 1 */
-85
View File
@@ -10,88 +10,3 @@ TIM2->ARR = (uint32_t)((72000000/freq)-1);TIM2->CCR3 = (uint32_t)(((72000000/fr
void add_a_note(uint16_t freq,uint8_t duty,uint16_t deley)
{
struct notes* buff;
buff = (struct notes*)malloc(sizeof(struct notes));
if (buff != NULL)
{
buff->freq = freq;
buff->duty = duty;
buff->deley = deley;
buff->next_note = NULL;
if (notes == NULL)
{
notes = buff;
}
else
{
struct notes *t = notes;
while (t->next_note != NULL)
{
t = t->next_note;
}
t->next_note = buff;
}
}
}
void delhead()
{
if (notes == NULL)
{
return;
}
if (notes->next_note == NULL)
{
free(notes);
notes = NULL;
}
else
{
struct notes *t = notes;
notes = notes->next_note;
free(t);
}
}
char buzzer_play_server()
{
static char busy_flag=0;
static uint32_t play_delay;
if(notes == NULL)
{
play_ones(0,0);
}else
{
if(busy_flag==0)
{
busy_flag=1;
play_delay=HAL_GetTick()+notes->deley;
play_ones(notes->freq,notes->duty);
}
if(busy_flag==1)
{
if(HAL_GetTick()>play_delay)
{
busy_flag=0;
delhead();
}
}
}
return busy_flag;
}
+2 -9
View File
@@ -3,16 +3,9 @@
#include "main.h"
struct notes
{
uint16_t freq;
uint8_t duty;
uint16_t deley;
struct notes *next_note;
};
void play_ones(uint16_t freq,uint8_t dutya);
void add_a_note(uint16_t freq,uint8_t duty,uint16_t deley);
char buzzer_play_server();
#endif /* BUZZER_H_ */
+38 -15
View File
@@ -177,6 +177,8 @@ char sys_lan=0;
int encode_c=0;
int test_code=0;
menu menu_main=
{
"Back\nInput\nBuzzer\nOLED\nAuto\nType\nLanguage\nAbout",
@@ -194,10 +196,10 @@ void mymain()
OLED_Init();//屏幕初始化
HAL_TIM_PWM_Start(&htim2,TIM_CHANNEL_3);//启动n通道的pwm
MUTE(1);//静音
//add_a_note(1000,50,1000);//开机响一声
HAL_TIM_Base_Start_IT(&htim3);
MUTE(0);
//play_ones(1000,50);
while(1)
{
@@ -219,6 +221,9 @@ void mymain()
sprintf(str,"ENCODE:%d",encode_c);
OLED_Str(0,8,8,str,1);
sprintf(str,"testcode:%d",test_code);
OLED_Str(0,16,8,str,1);
fps_++;
sprintf(str,"FPS:%d",fps);
OLED_Str(0,56,8,str,1);
@@ -247,7 +252,7 @@ void mymain()
GEI_BUTTON_CODE(&B1);//循环更新按钮
OLED_Cache_to_hardware();//刷新屏幕
buzzer_play_server();
if(HAL_GetTick()>run_tick)
{
run_tick+=1000;
@@ -266,17 +271,25 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
switch (GPIO_Pin)
{
case en_a_Pin:
switch(HAL_GPIO_ReadPin(en_b_GPIO_Port,en_b_Pin))
{
case 1:
E1.code+=1;
E1.move_flag=1;
break;
case 0:
E1.code-=1;
E1.move_flag=1;
break;
}
switch(HAL_GPIO_ReadPin(en_b_GPIO_Port,en_b_Pin))
{
case 1:
E1.code+=1;
E1.move_flag=1;
break;
case 0:
E1.code-=1;
E1.move_flag=1;
break;
}
break;
case tack_a_Pin:
test_code++;
break;
case tack_b_Pin:
test_code--;
break;
default:
@@ -285,3 +298,13 @@ void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
//__HAL_GPIO_EXTI_CLEAR_IT(GPIO_Pin);
}
}
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)//1ms
{
if (htim == (&htim3))
{
}
}
+2
View File
@@ -20,6 +20,8 @@ struct morsecode
char letter;
};
extern TIM_HandleTypeDef htim3;
void mymain();
#endif /* MYMAIN_H_ */
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -21,30 +21,66 @@ Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.9.0
Dialog DLL: TCM.DLL V1.53.0.0
<h2>Project:</h2>
C:\Users\kevin\Desktop\morse_code_trainer\f103c8t6_keil\MDK-ARM\f103c8t6_KEIL.uvprojx
Project File Date: 04/28/2022
C:\Users\wuwen\morse_code_trainer\f103c8t6_keil\MDK-ARM\f103c8t6_KEIL.uvprojx
Project File Date: 04/30/2022
<h2>Output:</h2>
*** Using Compiler 'V5.06 update 7 (build 960)', folder: 'C:\Keil_v5\ARM\ARMCC\Bin'
Build target 'f103c8t6_KEIL'
assembling startup_stm32f103xb.s...
compiling stm32f1xx_hal_msp.c...
compiling stm32f1xx_it.c...
compiling main.c...
./MYDEIVERS/oled.h(33): warning: #1295-D: Deprecated declaration OLED_Cache_to_hardware - give arg types
void OLED_Cache_to_hardware();
./MYDEIVERS/mymain.h(25): warning: #1295-D: Deprecated declaration mymain - give arg types
void mymain();
../Core/Src/main.c: 2 warnings, 0 errors
compiling stm32f1xx_hal_gpio_ex.c...
compiling stm32f1xx_hal.c...
compiling stm32f1xx_hal_i2c.c...
compiling stm32f1xx_hal_rcc_ex.c...
compiling stm32f1xx_hal_rcc.c...
compiling stm32f1xx_hal_gpio.c...
compiling stm32f1xx_hal_cortex.c...
compiling stm32f1xx_hal_dma.c...
compiling stm32f1xx_hal_pwr.c...
compiling stm32f1xx_hal_flash_ex.c...
compiling stm32f1xx_hal_flash.c...
compiling stm32f1xx_hal_exti.c...
compiling system_stm32f1xx.c...
compiling stm32f1xx_hal_tim_ex.c...
compiling stm32f1xx_hal_tim.c...
compiling hread_interface.c...
compiling mymain.c...
MYDEIVERS\oled.h(33): warning: #1295-D: Deprecated declaration OLED_Cache_to_hardware - give arg types
void OLED_Cache_to_hardware();
MYDEIVERS\buzzer.h(16): warning: #1295-D: Deprecated declaration buzzer_play_server - give arg types
char buzzer_play_server();
MYDEIVERS\mymain.h(23): warning: #1295-D: Deprecated declaration mymain - give arg types
MYDEIVERS\mymain.h(25): warning: #1295-D: Deprecated declaration mymain - give arg types
void mymain();
MYDEIVERS\mymain.c(197): warning: #188-D: enumerated type mixed with another type
MUTE(1);//é™éŸ³
MYDEIVERS\mymain.c(215): warning: #223-D: function "sprintf" declared implicitly
MYDEIVERS\mymain.c(200): warning: #188-D: enumerated type mixed with another type
MUTE(0);
MYDEIVERS\mymain.c(217): warning: #223-D: function "sprintf" declared implicitly
sprintf(str,"BUTTON:%d",B1.code);
MYDEIVERS\mymain.c(287): warning: #1-D: last line of file ends without a newline
MYDEIVERS\mymain.c(310): warning: #1-D: last line of file ends without a newline
}
MYDEIVERS\mymain.c: 6 warnings, 0 errors
MYDEIVERS\mymain.c: 5 warnings, 0 errors
compiling oled.c...
MYDEIVERS\oled.h(33): warning: #1295-D: Deprecated declaration OLED_Cache_to_hardware - give arg types
void OLED_Cache_to_hardware();
MYDEIVERS\oled.c(1036): warning: #550-D: variable "absx" was set but never used
int dx,dy,absx,absy;
MYDEIVERS\oled.c(1036): warning: #550-D: variable "absy" was set but never used
int dx,dy,absx,absy;
MYDEIVERS\oled.c: 3 warnings, 0 errors
compiling buzzer.c...
compiling encode.c...
MYDEIVERS\encode.c(62): warning: #1-D: last line of file ends without a newline
}
MYDEIVERS\encode.c: 1 warning, 0 errors
linking...
Program Size: Code=9832 RO-data=3768 RW-data=76 ZI-data=3876
Program Size: Code=8984 RO-data=3768 RW-data=68 ZI-data=3948
FromELF: creating hex file...
"f103c8t6_KEIL\f103c8t6_KEIL.axf" - 0 Error(s), 6 Warning(s).
"f103c8t6_KEIL\f103c8t6_KEIL.axf" - 0 Error(s), 11 Warning(s).
<h2>Software Packages used:</h2>
@@ -61,14 +97,14 @@ Package Vendor: Keil
<h2>Collection of Component include folders:</h2>
.\RTE\_f103c8t6_KEIL
C:\Users\kevin\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
C:\Users\kevin\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include
C:\Users\wuwen\AppData\Local\Arm\Packs\ARM\CMSIS\5.8.0\CMSIS\Core\Include
C:\Users\wuwen\AppData\Local\Arm\Packs\Keil\STM32F1xx_DFP\2.4.0\Device\Include
<h2>Collection of Component Files used:</h2>
* Component: ARM::CMSIS:CORE:5.5.0
Include file: CMSIS\Core\Include\tz_context.h
Build Time Elapsed: 00:00:02
Build Time Elapsed: 00:00:12
</pre>
</body>
</html>
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -475,8 +475,8 @@ ARM Macro Assembler Page 8
00000000
Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
ork --depend=f103c8t6_keil\startup_stm32f103xb.d -of103c8t6_keil\startup_stm32f
103xb.o -I.\RTE\_f103c8t6_KEIL -IC:\Users\kevin\AppData\Local\Arm\Packs\ARM\CMS
IS\5.8.0\CMSIS\Core\Include -IC:\Users\kevin\AppData\Local\Arm\Packs\Keil\STM32
103xb.o -I.\RTE\_f103c8t6_KEIL -IC:\Users\wuwen\AppData\Local\Arm\Packs\ARM\CMS
IS\5.8.0\CMSIS\Core\Include -IC:\Users\wuwen\AppData\Local\Arm\Packs\Keil\STM32
F1xx_DFP\2.4.0\Device\Include --predefine="__EVAL SETA 1" --predefine="__UVISIO
N_VERSION SETA 536" --predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1
" --predefine="_RTE_ SETA 1" --list=startup_stm32f103xb.lst startup_stm32f103xb
+23 -7
View File
@@ -9,7 +9,8 @@ Mcu.IP1=NVIC
Mcu.IP2=RCC
Mcu.IP3=SYS
Mcu.IP4=TIM2
Mcu.IPNb=5
Mcu.IP5=TIM3
Mcu.IPNb=6
Mcu.Name=STM32F103C(8-B)Tx
Mcu.Package=LQFP48
Mcu.Pin0=PC14-OSC32_IN
@@ -23,6 +24,7 @@ Mcu.Pin15=PB6
Mcu.Pin16=PB7
Mcu.Pin17=VP_SYS_VS_Systick
Mcu.Pin18=VP_TIM2_VS_ClockSourceINT
Mcu.Pin19=VP_TIM3_VS_ClockSourceINT
Mcu.Pin2=PD0-OSC_IN
Mcu.Pin3=PD1-OSC_OUT
Mcu.Pin4=PA2
@@ -31,7 +33,7 @@ Mcu.Pin6=PB0
Mcu.Pin7=PB1
Mcu.Pin8=PB12
Mcu.Pin9=PB15
Mcu.PinsNb=19
Mcu.PinsNb=20
Mcu.ThirdPartyNb=0
Mcu.UserConstants=
Mcu.UserName=STM32F103C8Tx
@@ -39,6 +41,8 @@ MxCube.Version=6.5.0
MxDb.Version=DB.6.0.50
NVIC.BusFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
NVIC.EXTI0_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.EXTI1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.EXTI4_IRQn=true\:0\:0\:true\:false\:true\:true\:true\:true
NVIC.ForceEnableDMAVector=true
NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
@@ -49,6 +53,7 @@ NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4
NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:true
NVIC.TIM2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.TIM3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:true
PA13.Mode=Serial_Wire
PA13.Signal=SYS_JTMS-SWDIO
@@ -64,16 +69,18 @@ PA3.GPIO_Speed=GPIO_SPEED_FREQ_HIGH
PA3.Locked=true
PA3.PinState=GPIO_PIN_SET
PA3.Signal=GPIO_Output
PB0.GPIOParameters=GPIO_PuPd,GPIO_Label
PB0.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI
PB0.GPIO_Label=tack_a
PB0.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING
PB0.GPIO_PuPd=GPIO_PULLUP
PB0.Locked=true
PB0.Signal=GPIO_Input
PB1.GPIOParameters=GPIO_PuPd,GPIO_Label
PB0.Signal=GPXTI0
PB1.GPIOParameters=GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultEXTI
PB1.GPIO_Label=tack_b
PB1.GPIO_ModeDefaultEXTI=GPIO_MODE_IT_RISING_FALLING
PB1.GPIO_PuPd=GPIO_PULLUP
PB1.Locked=true
PB1.Signal=GPIO_Input
PB1.Signal=GPXTI1
PB12.GPIOParameters=GPIO_Speed,PinState,GPIO_PuPd,GPIO_Label,GPIO_ModeDefaultOutputPP
PB12.GPIO_Label=run_led2
PB12.GPIO_ModeDefaultOutputPP=GPIO_MODE_OUTPUT_PP
@@ -145,7 +152,7 @@ ProjectManager.StackSize=0x400
ProjectManager.TargetToolchain=MDK-ARM V5.32
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=false
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_TIM2_Init-TIM2-false-HAL-true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_I2C1_Init-I2C1-false-HAL-true,4-MX_TIM2_Init-TIM2-false-HAL-true,5-MX_TIM3_Init-TIM3-false-HAL-true
RCC.ADCFreqValue=36000000
RCC.AHBFreq_Value=72000000
RCC.APB1CLKDivider=RCC_HCLK_DIV2
@@ -167,6 +174,10 @@ RCC.SYSCLKSource=RCC_SYSCLKSOURCE_PLLCLK
RCC.TimSysFreq_Value=72000000
RCC.USBFreq_Value=72000000
RCC.VCOOutput2Freq_Value=8000000
SH.GPXTI0.0=GPIO_EXTI0
SH.GPXTI0.ConfNb=1
SH.GPXTI1.0=GPIO_EXTI1
SH.GPXTI1.ConfNb=1
SH.GPXTI4.0=GPIO_EXTI4
SH.GPXTI4.ConfNb=1
SH.S_TIM2_CH3.0=TIM2_CH3,PWM Generation3 CH3
@@ -174,8 +185,13 @@ SH.S_TIM2_CH3.ConfNb=1
TIM2.Channel-PWM\ Generation3\ CH3=TIM_CHANNEL_3
TIM2.IPParameters=Channel-PWM Generation3 CH3,Period
TIM2.Period=0
TIM3.IPParameters=Prescaler,Period
TIM3.Period=1000-1
TIM3.Prescaler=72-1
VP_SYS_VS_Systick.Mode=SysTick
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
VP_TIM2_VS_ClockSourceINT.Mode=Internal
VP_TIM2_VS_ClockSourceINT.Signal=TIM2_VS_ClockSourceINT
VP_TIM3_VS_ClockSourceINT.Mode=Internal
VP_TIM3_VS_ClockSourceINT.Signal=TIM3_VS_ClockSourceINT
board=custom