adc progress, not yet done
This commit is contained in:
parent
a5b20556ac
commit
9cf28e2099
@ -74,6 +74,8 @@ void Error_Handler(void);
|
|||||||
#define LED_Red_GPIO_Port GPIOE
|
#define LED_Red_GPIO_Port GPIOE
|
||||||
#define Frontend_In_Pin GPIO_PIN_1
|
#define Frontend_In_Pin GPIO_PIN_1
|
||||||
#define Frontend_In_GPIO_Port GPIOA
|
#define Frontend_In_GPIO_Port GPIOA
|
||||||
|
#define Debug_Signal_Pin GPIO_PIN_10
|
||||||
|
#define Debug_Signal_GPIO_Port GPIOB
|
||||||
#define Debug_TX_Pin GPIO_PIN_10
|
#define Debug_TX_Pin GPIO_PIN_10
|
||||||
#define Debug_TX_GPIO_Port GPIOC
|
#define Debug_TX_GPIO_Port GPIOC
|
||||||
#define Debug_RX_Pin GPIO_PIN_11
|
#define Debug_RX_Pin GPIO_PIN_11
|
||||||
|
@ -52,6 +52,9 @@ void MX_GPIO_Init(void)
|
|||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(GPIOE, Loop_Enable_Pin|Loop_Disable_Pin|LED_Green_Pin|LED_Red_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(GPIOE, Loop_Enable_Pin|Loop_Disable_Pin|LED_Green_Pin|LED_Red_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
|
/*Configure GPIO pin Output Level */
|
||||||
|
HAL_GPIO_WritePin(Debug_Signal_GPIO_Port, Debug_Signal_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
/*Configure GPIO pin Output Level */
|
/*Configure GPIO pin Output Level */
|
||||||
HAL_GPIO_WritePin(Frontend_Out_GPIO_Port, Frontend_Out_Pin, GPIO_PIN_RESET);
|
HAL_GPIO_WritePin(Frontend_Out_GPIO_Port, Frontend_Out_Pin, GPIO_PIN_RESET);
|
||||||
|
|
||||||
@ -68,6 +71,13 @@ void MX_GPIO_Init(void)
|
|||||||
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
GPIO_InitStruct.Pull = GPIO_PULLUP;
|
||||||
HAL_GPIO_Init(Loop_Status_GPIO_Port, &GPIO_InitStruct);
|
HAL_GPIO_Init(Loop_Status_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
|
/*Configure GPIO pin : PtPin */
|
||||||
|
GPIO_InitStruct.Pin = Debug_Signal_Pin;
|
||||||
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
GPIO_InitStruct.Pull = GPIO_NOPULL;
|
||||||
|
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
|
||||||
|
HAL_GPIO_Init(Debug_Signal_GPIO_Port, &GPIO_InitStruct);
|
||||||
|
|
||||||
/*Configure GPIO pin : PtPin */
|
/*Configure GPIO pin : PtPin */
|
||||||
GPIO_InitStruct.Pin = Frontend_Out_Pin;
|
GPIO_InitStruct.Pin = Frontend_Out_Pin;
|
||||||
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
# Processed by ../tools/insertMyCode.sh
|
# Processed by ../tools/insertMyCode.sh
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Oct 31 20:50:19 CET 2020]
|
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Oct 31 23:17:35 CET 2020]
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Oct 31 20:50:19 CET 2020]
|
# File automatically-generated by tool: [projectgenerator] version: [3.10.0-B14] date: [Sat Oct 31 23:17:35 CET 2020]
|
||||||
##########################################################################################################################
|
##########################################################################################################################
|
||||||
|
|
||||||
# ------------------------------------------------
|
# ------------------------------------------------
|
||||||
|
@ -44,6 +44,7 @@ void frontendDisable() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void frontendAdcCallback(ADC_HandleTypeDef* hadc) {
|
void frontendAdcCallback(ADC_HandleTypeDef* hadc) {
|
||||||
uint16_t rawValue = HAL_ADC_GetValue(hadc);
|
// uint16_t rawValue = HAL_ADC_GetValue(hadc);
|
||||||
|
HAL_GPIO_TogglePin(Debug_Signal_GPIO_Port, Debug_Signal_Pin);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -62,4 +62,5 @@ void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc) {
|
|||||||
if (hadc == &frontendAdc) {
|
if (hadc == &frontendAdc) {
|
||||||
frontendAdcCallback(hadc);
|
frontendAdcCallback(hadc);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -24,27 +24,28 @@ Mcu.Name=STM32F103V(C-D-E)Tx
|
|||||||
Mcu.Package=LQFP100
|
Mcu.Package=LQFP100
|
||||||
Mcu.Pin0=PE2
|
Mcu.Pin0=PE2
|
||||||
Mcu.Pin1=PE3
|
Mcu.Pin1=PE3
|
||||||
Mcu.Pin10=PB15
|
Mcu.Pin10=PB14
|
||||||
Mcu.Pin11=PA13
|
Mcu.Pin11=PB15
|
||||||
Mcu.Pin12=PA14
|
Mcu.Pin12=PA13
|
||||||
Mcu.Pin13=PC10
|
Mcu.Pin13=PA14
|
||||||
Mcu.Pin14=PC11
|
Mcu.Pin14=PC10
|
||||||
Mcu.Pin15=PC12
|
Mcu.Pin15=PC11
|
||||||
Mcu.Pin16=PD1
|
Mcu.Pin16=PC12
|
||||||
Mcu.Pin17=PD2
|
Mcu.Pin17=PD1
|
||||||
Mcu.Pin18=PB3
|
Mcu.Pin18=PD2
|
||||||
Mcu.Pin19=PB4
|
Mcu.Pin19=PB3
|
||||||
Mcu.Pin2=PE4
|
Mcu.Pin2=PE4
|
||||||
Mcu.Pin20=PB5
|
Mcu.Pin20=PB4
|
||||||
Mcu.Pin21=VP_SYS_VS_Systick
|
Mcu.Pin21=PB5
|
||||||
|
Mcu.Pin22=VP_SYS_VS_Systick
|
||||||
Mcu.Pin3=PE5
|
Mcu.Pin3=PE5
|
||||||
Mcu.Pin4=PE6
|
Mcu.Pin4=PE6
|
||||||
Mcu.Pin5=OSC_IN
|
Mcu.Pin5=OSC_IN
|
||||||
Mcu.Pin6=OSC_OUT
|
Mcu.Pin6=OSC_OUT
|
||||||
Mcu.Pin7=PA1
|
Mcu.Pin7=PA1
|
||||||
Mcu.Pin8=PB13
|
Mcu.Pin8=PB10
|
||||||
Mcu.Pin9=PB14
|
Mcu.Pin9=PB13
|
||||||
Mcu.PinsNb=22
|
Mcu.PinsNb=23
|
||||||
Mcu.ThirdPartyNb=0
|
Mcu.ThirdPartyNb=0
|
||||||
Mcu.UserConstants=debugUart,huart4;mbusUart,huart5;frontendAdc,hadc1
|
Mcu.UserConstants=debugUart,huart4;mbusUart,huart5;frontendAdc,hadc1
|
||||||
Mcu.UserName=STM32F103VCTx
|
Mcu.UserName=STM32F103VCTx
|
||||||
@ -76,6 +77,10 @@ PA13.Mode=Serial_Wire
|
|||||||
PA13.Signal=SYS_JTMS-SWDIO
|
PA13.Signal=SYS_JTMS-SWDIO
|
||||||
PA14.Mode=Serial_Wire
|
PA14.Mode=Serial_Wire
|
||||||
PA14.Signal=SYS_JTCK-SWCLK
|
PA14.Signal=SYS_JTCK-SWCLK
|
||||||
|
PB10.GPIOParameters=GPIO_Label
|
||||||
|
PB10.GPIO_Label=Debug_Signal
|
||||||
|
PB10.Locked=true
|
||||||
|
PB10.Signal=GPIO_Output
|
||||||
PB13.Mode=Full_Duplex_Master
|
PB13.Mode=Full_Duplex_Master
|
||||||
PB13.Signal=SPI2_SCK
|
PB13.Signal=SPI2_SCK
|
||||||
PB14.Mode=Full_Duplex_Master
|
PB14.Mode=Full_Duplex_Master
|
||||||
|
Loading…
x
Reference in New Issue
Block a user