[fix] modify calc freq/phase and correct bugs
This commit is contained in:
@@ -88,6 +88,10 @@ void Error_Handler(void);
|
||||
#define BTN_CH1_GPIO_Port GPIOA
|
||||
#define LED_CH1_Pin GPIO_PIN_10
|
||||
#define LED_CH1_GPIO_Port GPIOA
|
||||
#define BTN_CH2_Pin GPIO_PIN_11
|
||||
#define BTN_CH2_GPIO_Port GPIOA
|
||||
#define LED_CH2_Pin GPIO_PIN_12
|
||||
#define LED_CH2_GPIO_Port GPIOA
|
||||
#define TMS_Pin GPIO_PIN_13
|
||||
#define TMS_GPIO_Port GPIOA
|
||||
#define TCK_Pin GPIO_PIN_14
|
||||
|
||||
@@ -57,7 +57,7 @@ void MX_GPIO_Init(void)
|
||||
HAL_GPIO_WritePin(GPIOC, ST7565_RST_Pin|ST7565_A0_Pin|ST7565_CS_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin Output Level */
|
||||
HAL_GPIO_WritePin(LED_CH1_GPIO_Port, LED_CH1_Pin, GPIO_PIN_RESET);
|
||||
HAL_GPIO_WritePin(GPIOA, LED_CH1_Pin|LED_CH2_Pin, GPIO_PIN_RESET);
|
||||
|
||||
/*Configure GPIO pin : PtPin */
|
||||
GPIO_InitStruct.Pin = B1_Pin;
|
||||
@@ -66,9 +66,9 @@ void MX_GPIO_Init(void)
|
||||
HAL_GPIO_Init(B1_GPIO_Port, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pins : PAPin PAPin PAPin PAPin
|
||||
PAPin PAPin */
|
||||
PAPin PAPin PAPin */
|
||||
GPIO_InitStruct.Pin = BTN1_Pin|BTN2_Pin|BTN3_Pin|BTN4_Pin
|
||||
|BTN5_Pin|BTN_CH1_Pin;
|
||||
|BTN5_Pin|BTN_CH1_Pin|BTN_CH2_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_INPUT;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
@@ -87,12 +87,12 @@ void MX_GPIO_Init(void)
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
|
||||
|
||||
/*Configure GPIO pin : PtPin */
|
||||
GPIO_InitStruct.Pin = LED_CH1_Pin;
|
||||
/*Configure GPIO pins : PAPin PAPin */
|
||||
GPIO_InitStruct.Pin = LED_CH1_Pin|LED_CH2_Pin;
|
||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||
HAL_GPIO_Init(LED_CH1_GPIO_Port, &GPIO_InitStruct);
|
||||
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
##########################################################################################################################
|
||||
# File automatically-generated by tool: [projectgenerator] version: [3.17.1] date: [Mon Jul 31 14:03:39 CEST 2023]
|
||||
# File automatically-generated by tool: [projectgenerator] version: [3.17.1] date: [Mon Jul 31 16:49:59 CEST 2023]
|
||||
##########################################################################################################################
|
||||
|
||||
# ------------------------------------------------
|
||||
|
||||
@@ -36,25 +36,27 @@ Mcu.Pin20=PC9
|
||||
Mcu.Pin21=PA8
|
||||
Mcu.Pin22=PA9
|
||||
Mcu.Pin23=PA10
|
||||
Mcu.Pin24=PA13
|
||||
Mcu.Pin25=PA14
|
||||
Mcu.Pin26=PC10
|
||||
Mcu.Pin27=PC11
|
||||
Mcu.Pin28=PC12
|
||||
Mcu.Pin29=PB3
|
||||
Mcu.Pin24=PA11
|
||||
Mcu.Pin25=PA12
|
||||
Mcu.Pin26=PA13
|
||||
Mcu.Pin27=PA14
|
||||
Mcu.Pin28=PC10
|
||||
Mcu.Pin29=PC11
|
||||
Mcu.Pin3=PF0-OSC_IN
|
||||
Mcu.Pin30=PB6
|
||||
Mcu.Pin31=PB7
|
||||
Mcu.Pin32=PB9
|
||||
Mcu.Pin33=VP_SYS_VS_Systick
|
||||
Mcu.Pin34=VP_TIM2_VS_ClockSourceINT
|
||||
Mcu.Pin30=PC12
|
||||
Mcu.Pin31=PB3
|
||||
Mcu.Pin32=PB6
|
||||
Mcu.Pin33=PB7
|
||||
Mcu.Pin34=PB9
|
||||
Mcu.Pin35=VP_SYS_VS_Systick
|
||||
Mcu.Pin36=VP_TIM2_VS_ClockSourceINT
|
||||
Mcu.Pin4=PF1-OSC_OUT
|
||||
Mcu.Pin5=PA0
|
||||
Mcu.Pin6=PA1
|
||||
Mcu.Pin7=PA2
|
||||
Mcu.Pin8=PA3
|
||||
Mcu.Pin9=PA4
|
||||
Mcu.PinsNb=35
|
||||
Mcu.PinsNb=37
|
||||
Mcu.ThirdPartyNb=0
|
||||
Mcu.UserConstants=
|
||||
Mcu.UserName=STM32F303RETx
|
||||
@@ -83,6 +85,14 @@ PA10.GPIOParameters=GPIO_Label
|
||||
PA10.GPIO_Label=LED_CH1
|
||||
PA10.Locked=true
|
||||
PA10.Signal=GPIO_Output
|
||||
PA11.GPIOParameters=GPIO_Label
|
||||
PA11.GPIO_Label=BTN_CH2
|
||||
PA11.Locked=true
|
||||
PA11.Signal=GPIO_Input
|
||||
PA12.GPIOParameters=GPIO_Label
|
||||
PA12.GPIO_Label=LED_CH2
|
||||
PA12.Locked=true
|
||||
PA12.Signal=GPIO_Output
|
||||
PA13.GPIOParameters=GPIO_Label
|
||||
PA13.GPIO_Label=TMS
|
||||
PA13.Locked=true
|
||||
|
||||
Reference in New Issue
Block a user