From 70f414e18b7e9409f595c2590718408f4151c0c4 Mon Sep 17 00:00:00 2001 From: murmur Date: Mon, 23 Dec 2024 23:15:14 +0800 Subject: [PATCH] =?UTF-8?q?add=20uart4=EF=BC=8Cupdate=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Core/Inc/flash_config.h | 2 +- Core/Inc/main.h | 4 +- Core/Inc/stm32f1xx_it.h | 3 + Core/Inc/usart.h | 3 + Core/Src/dma.c | 7 +++ Core/Src/gpio.c | 28 +++++---- Core/Src/http_server.c | 2 +- Core/Src/main.c | 25 +++++++- Core/Src/stm32f1xx_it.c | 45 +++++++++++++++ Core/Src/usart.c | 122 +++++++++++++++++++++++++++++++++++++++- Core/motor | 2 +- f1CTL.ioc | 89 ++++++++++++++++++++--------- 12 files changed, 282 insertions(+), 50 deletions(-) diff --git a/Core/Inc/flash_config.h b/Core/Inc/flash_config.h index 916ec27..1c96e0e 100644 --- a/Core/Inc/flash_config.h +++ b/Core/Inc/flash_config.h @@ -9,7 +9,7 @@ typedef struct { uint32_t magic; // 魔数,用于验证配置有效性 wiz_NetInfo net_config; // 网络配置 - DeviceParam device_param; // 设备参数 + DeviceParam_t device_param; // 设备参数 uint32_t checksum; // 校验和 } FlashConfig_t; diff --git a/Core/Inc/main.h b/Core/Inc/main.h index 1dd54fb..935a13c 100644 --- a/Core/Inc/main.h +++ b/Core/Inc/main.h @@ -55,12 +55,14 @@ extern volatile uint8_t motorRxEnd; /* Exported functions prototypes ---------------------------------------------*/ void Error_Handler(void); -void transDataToMotorValve(uint8_t *data, uint16_t len); + /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ +#define DIR4_Pin GPIO_PIN_0 +#define DIR4_GPIO_Port GPIOA #define DIR2_Pin GPIO_PIN_1 #define DIR2_GPIO_Port GPIOA #define DIR1_Pin GPIO_PIN_2 diff --git a/Core/Inc/stm32f1xx_it.h b/Core/Inc/stm32f1xx_it.h index 1c8bb2d..8d5732b 100644 --- a/Core/Inc/stm32f1xx_it.h +++ b/Core/Inc/stm32f1xx_it.h @@ -62,6 +62,9 @@ void DMA1_Channel5_IRQHandler(void); void USART1_IRQHandler(void); void USART2_IRQHandler(void); void USART3_IRQHandler(void); +void UART4_IRQHandler(void); +void DMA2_Channel3_IRQHandler(void); +void DMA2_Channel4_5_IRQHandler(void); /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ diff --git a/Core/Inc/usart.h b/Core/Inc/usart.h index 4280d40..2bfae13 100644 --- a/Core/Inc/usart.h +++ b/Core/Inc/usart.h @@ -32,6 +32,8 @@ extern "C" { /* USER CODE END Includes */ +extern UART_HandleTypeDef huart4; + extern UART_HandleTypeDef huart1; extern UART_HandleTypeDef huart2; @@ -42,6 +44,7 @@ extern UART_HandleTypeDef huart3; /* USER CODE END Private defines */ +void MX_UART4_Init(void); void MX_USART1_UART_Init(void); void MX_USART2_UART_Init(void); void MX_USART3_UART_Init(void); diff --git a/Core/Src/dma.c b/Core/Src/dma.c index 36438b5..18e4102 100644 --- a/Core/Src/dma.c +++ b/Core/Src/dma.c @@ -41,6 +41,7 @@ void MX_DMA_Init(void) /* DMA controller clock enable */ __HAL_RCC_DMA1_CLK_ENABLE(); + __HAL_RCC_DMA2_CLK_ENABLE(); /* DMA interrupt init */ /* DMA1_Channel2_IRQn interrupt configuration */ @@ -55,6 +56,12 @@ void MX_DMA_Init(void) /* DMA1_Channel5_IRQn interrupt configuration */ HAL_NVIC_SetPriority(DMA1_Channel5_IRQn, 0, 0); HAL_NVIC_EnableIRQ(DMA1_Channel5_IRQn); + /* DMA2_Channel3_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(DMA2_Channel3_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(DMA2_Channel3_IRQn); + /* DMA2_Channel4_5_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(DMA2_Channel4_5_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(DMA2_Channel4_5_IRQn); } diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index f172ffc..56bfe75 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -54,7 +54,7 @@ void MX_GPIO_Init(void) __HAL_RCC_GPIOD_CLK_ENABLE(); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(DIR2_GPIO_Port, DIR2_Pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOA, DIR4_Pin|DIR2_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOB, DIR1_Pin|HOST_485EN_Pin, GPIO_PIN_RESET); @@ -79,29 +79,27 @@ void MX_GPIO_Init(void) /*Configure GPIO pins : PC13 PC14 PC15 PC0 PC1 PC2 PC3 PC4 PC5 PC6 PC7 PC8 - PC9 PC10 PC11 PC12 */ + PC9 PC12 */ GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15|GPIO_PIN_0 |GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_4 |GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8 - |GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11|GPIO_PIN_12; + |GPIO_PIN_9|GPIO_PIN_12; GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); - /*Configure GPIO pins : PA0 PA4 PA5 PA6 - PA7 PA8 PA11 PA12 - PA15 */ - GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6 - |GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_11|GPIO_PIN_12 - |GPIO_PIN_15; - GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; - HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); - - /*Configure GPIO pin : DIR2_Pin */ - GPIO_InitStruct.Pin = DIR2_Pin; + /*Configure GPIO pins : DIR4_Pin DIR2_Pin */ + GPIO_InitStruct.Pin = DIR4_Pin|DIR2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(DIR2_GPIO_Port, &GPIO_InitStruct); + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /*Configure GPIO pins : PA4 PA5 PA6 PA7 + PA8 PA11 PA12 PA15 */ + GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6|GPIO_PIN_7 + |GPIO_PIN_8|GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_15; + GPIO_InitStruct.Mode = GPIO_MODE_ANALOG; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); /*Configure GPIO pins : PB0 PB1 PB3 PB4 PB5 PB6 PB7 PB8 diff --git a/Core/Src/http_server.c b/Core/Src/http_server.c index 1ac7530..9217a32 100644 --- a/Core/Src/http_server.c +++ b/Core/Src/http_server.c @@ -182,7 +182,7 @@ static void handle_status_request(uint8_t sn) "\"errorCode\":%d," "\"initStatus\":%d" "}", - deviceStatus.deviceStatus, + deviceStatus.sensorStatus, deviceStatus.valves.angle1, deviceStatus.valves.angle2, deviceStatus.pumps.status1, diff --git a/Core/Src/main.c b/Core/Src/main.c index f6ab2ff..141ccfe 100644 --- a/Core/Src/main.c +++ b/Core/Src/main.c @@ -60,6 +60,10 @@ uint8_t motorRxBuf[MOTOR_BUFFER_SIZE]; //接收缓存 /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); /* USER CODE BEGIN PFP */ +// HOST_485EN-uart3,原HOST,无法通信,暂时放弃 +// dir2-uart2,控制泵 +// dir4-uart4,控制阀 +// dir1-uart1,HOST void transDataToHost(uint8_t *data, uint16_t len) { // 开启uart3 dma @@ -80,6 +84,12 @@ void transDataToMotorValve(uint8_t *data, uint16_t len) HAL_GPIO_WritePin(DIR2_GPIO_Port, DIR2_Pin, GPIO_PIN_RESET); // HAL_Delay(100); } +void transDataToMotorValve2(uint8_t *data, uint16_t len) +{ + HAL_GPIO_WritePin(DIR4_GPIO_Port, DIR4_Pin, GPIO_PIN_SET); + HAL_UART_Transmit(&huart4, data, len, 100); + HAL_GPIO_WritePin(DIR4_GPIO_Port, DIR4_Pin, GPIO_PIN_RESET); +} /* USER CODE END PFP */ /* Private user code ---------------------------------------------------------*/ @@ -121,8 +131,7 @@ int main(void) MX_USART2_UART_Init(); MX_SPI2_Init(); MX_USART3_UART_Init(); - - + MX_UART4_Init(); /* USER CODE BEGIN 2 */ memset(hostRxBuf, 0xff, HOST_BUFFER_SIZE); // 开启uart1中断和dma,使用uart1为host @@ -143,7 +152,9 @@ int main(void) // http_test_request(); HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); printf("Init success!\r\n"); - runPumpDemo(); + initSystem(); + // runPumpDemo(); + runValveDemo(); /* USER CODE END 2 */ /* Infinite loop */ @@ -161,6 +172,14 @@ int main(void) hostRxEnd = 0; HAL_UART_Receive_DMA(&huart1, hostRxBuf, HOST_BUFFER_SIZE); } + + static uint32_t count = 0; + if(count++ > 5000*2) { + count = 0; + updateSystemStatus(); + // runPumpDemo(); + // runValveDemo(); + } } /* USER CODE END 3 */ } diff --git a/Core/Src/stm32f1xx_it.c b/Core/Src/stm32f1xx_it.c index eee15a2..8b3cc6a 100644 --- a/Core/Src/stm32f1xx_it.c +++ b/Core/Src/stm32f1xx_it.c @@ -55,10 +55,13 @@ /* USER CODE END 0 */ /* External variables --------------------------------------------------------*/ +extern DMA_HandleTypeDef hdma_uart4_rx; +extern DMA_HandleTypeDef hdma_uart4_tx; extern DMA_HandleTypeDef hdma_usart1_rx; extern DMA_HandleTypeDef hdma_usart1_tx; extern DMA_HandleTypeDef hdma_usart3_rx; extern DMA_HandleTypeDef hdma_usart3_tx; +extern UART_HandleTypeDef huart4; extern UART_HandleTypeDef huart1; extern UART_HandleTypeDef huart2; extern UART_HandleTypeDef huart3; @@ -326,6 +329,48 @@ void USART3_IRQHandler(void) /* USER CODE END USART3_IRQn 1 */ } +/** + * @brief This function handles UART4 global interrupt. + */ +void UART4_IRQHandler(void) +{ + /* USER CODE BEGIN UART4_IRQn 0 */ + + /* USER CODE END UART4_IRQn 0 */ + HAL_UART_IRQHandler(&huart4); + /* USER CODE BEGIN UART4_IRQn 1 */ + + /* USER CODE END UART4_IRQn 1 */ +} + +/** + * @brief This function handles DMA2 channel3 global interrupt. + */ +void DMA2_Channel3_IRQHandler(void) +{ + /* USER CODE BEGIN DMA2_Channel3_IRQn 0 */ + + /* USER CODE END DMA2_Channel3_IRQn 0 */ + HAL_DMA_IRQHandler(&hdma_uart4_rx); + /* USER CODE BEGIN DMA2_Channel3_IRQn 1 */ + + /* USER CODE END DMA2_Channel3_IRQn 1 */ +} + +/** + * @brief This function handles DMA2 channel4 and channel5 global interrupts. + */ +void DMA2_Channel4_5_IRQHandler(void) +{ + /* USER CODE BEGIN DMA2_Channel4_5_IRQn 0 */ + + /* USER CODE END DMA2_Channel4_5_IRQn 0 */ + HAL_DMA_IRQHandler(&hdma_uart4_tx); + /* USER CODE BEGIN DMA2_Channel4_5_IRQn 1 */ + + /* USER CODE END DMA2_Channel4_5_IRQn 1 */ +} + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ diff --git a/Core/Src/usart.c b/Core/Src/usart.c index 64faba8..b7b2987 100644 --- a/Core/Src/usart.c +++ b/Core/Src/usart.c @@ -24,14 +24,45 @@ /* USER CODE END 0 */ +UART_HandleTypeDef huart4; UART_HandleTypeDef huart1; UART_HandleTypeDef huart2; UART_HandleTypeDef huart3; +DMA_HandleTypeDef hdma_uart4_rx; +DMA_HandleTypeDef hdma_uart4_tx; DMA_HandleTypeDef hdma_usart1_rx; DMA_HandleTypeDef hdma_usart1_tx; DMA_HandleTypeDef hdma_usart3_rx; DMA_HandleTypeDef hdma_usart3_tx; +/* UART4 init function */ +void MX_UART4_Init(void) +{ + + /* USER CODE BEGIN UART4_Init 0 */ + + /* USER CODE END UART4_Init 0 */ + + /* USER CODE BEGIN UART4_Init 1 */ + + /* USER CODE END UART4_Init 1 */ + huart4.Instance = UART4; + huart4.Init.BaudRate = 115200; + huart4.Init.WordLength = UART_WORDLENGTH_8B; + huart4.Init.StopBits = UART_STOPBITS_1; + huart4.Init.Parity = UART_PARITY_NONE; + huart4.Init.Mode = UART_MODE_TX_RX; + huart4.Init.HwFlowCtl = UART_HWCONTROL_NONE; + huart4.Init.OverSampling = UART_OVERSAMPLING_16; + if (HAL_UART_Init(&huart4) != HAL_OK) + { + Error_Handler(); + } + /* USER CODE BEGIN UART4_Init 2 */ + + /* USER CODE END UART4_Init 2 */ + +} /* USART1 init function */ void MX_USART1_UART_Init(void) @@ -124,7 +155,70 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(uartHandle->Instance==USART1) + if(uartHandle->Instance==UART4) + { + /* USER CODE BEGIN UART4_MspInit 0 */ + + /* USER CODE END UART4_MspInit 0 */ + /* UART4 clock enable */ + __HAL_RCC_UART4_CLK_ENABLE(); + + __HAL_RCC_GPIOC_CLK_ENABLE(); + /**UART4 GPIO Configuration + PC10 ------> UART4_TX + PC11 ------> UART4_RX + */ + GPIO_InitStruct.Pin = GPIO_PIN_10; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_HIGH; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_11; + GPIO_InitStruct.Mode = GPIO_MODE_INPUT; + GPIO_InitStruct.Pull = GPIO_NOPULL; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + /* UART4 DMA Init */ + /* UART4_RX Init */ + hdma_uart4_rx.Instance = DMA2_Channel3; + hdma_uart4_rx.Init.Direction = DMA_PERIPH_TO_MEMORY; + hdma_uart4_rx.Init.PeriphInc = DMA_PINC_DISABLE; + hdma_uart4_rx.Init.MemInc = DMA_MINC_ENABLE; + hdma_uart4_rx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; + hdma_uart4_rx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; + hdma_uart4_rx.Init.Mode = DMA_NORMAL; + hdma_uart4_rx.Init.Priority = DMA_PRIORITY_LOW; + if (HAL_DMA_Init(&hdma_uart4_rx) != HAL_OK) + { + Error_Handler(); + } + + __HAL_LINKDMA(uartHandle,hdmarx,hdma_uart4_rx); + + /* UART4_TX Init */ + hdma_uart4_tx.Instance = DMA2_Channel5; + hdma_uart4_tx.Init.Direction = DMA_MEMORY_TO_PERIPH; + hdma_uart4_tx.Init.PeriphInc = DMA_PINC_DISABLE; + hdma_uart4_tx.Init.MemInc = DMA_MINC_ENABLE; + hdma_uart4_tx.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; + hdma_uart4_tx.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; + hdma_uart4_tx.Init.Mode = DMA_NORMAL; + hdma_uart4_tx.Init.Priority = DMA_PRIORITY_LOW; + if (HAL_DMA_Init(&hdma_uart4_tx) != HAL_OK) + { + Error_Handler(); + } + + __HAL_LINKDMA(uartHandle,hdmatx,hdma_uart4_tx); + + /* UART4 interrupt Init */ + HAL_NVIC_SetPriority(UART4_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(UART4_IRQn); + /* USER CODE BEGIN UART4_MspInit 1 */ + + /* USER CODE END UART4_MspInit 1 */ + } + else if(uartHandle->Instance==USART1) { /* USER CODE BEGIN USART1_MspInit 0 */ @@ -285,7 +379,31 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) { - if(uartHandle->Instance==USART1) + if(uartHandle->Instance==UART4) + { + /* USER CODE BEGIN UART4_MspDeInit 0 */ + + /* USER CODE END UART4_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_UART4_CLK_DISABLE(); + + /**UART4 GPIO Configuration + PC10 ------> UART4_TX + PC11 ------> UART4_RX + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11); + + /* UART4 DMA DeInit */ + HAL_DMA_DeInit(uartHandle->hdmarx); + HAL_DMA_DeInit(uartHandle->hdmatx); + + /* UART4 interrupt Deinit */ + HAL_NVIC_DisableIRQ(UART4_IRQn); + /* USER CODE BEGIN UART4_MspDeInit 1 */ + + /* USER CODE END UART4_MspDeInit 1 */ + } + else if(uartHandle->Instance==USART1) { /* USER CODE BEGIN USART1_MspDeInit 0 */ diff --git a/Core/motor b/Core/motor index ce85303..614cb70 160000 --- a/Core/motor +++ b/Core/motor @@ -1 +1 @@ -Subproject commit ce8530303e7042bb58c67772ecd9c32586df1fdb +Subproject commit 614cb70134cfc25450f62f3036b7bf9a190f7859 diff --git a/f1CTL.ioc b/f1CTL.ioc index b4c0348..8ab73e3 100644 --- a/f1CTL.ioc +++ b/f1CTL.ioc @@ -6,7 +6,27 @@ Dma.Request0=USART1_RX Dma.Request1=USART1_TX Dma.Request2=USART3_RX Dma.Request3=USART3_TX -Dma.RequestsNb=4 +Dma.Request4=UART4_RX +Dma.Request5=UART4_TX +Dma.RequestsNb=6 +Dma.UART4_RX.4.Direction=DMA_PERIPH_TO_MEMORY +Dma.UART4_RX.4.Instance=DMA2_Channel3 +Dma.UART4_RX.4.MemDataAlignment=DMA_MDATAALIGN_BYTE +Dma.UART4_RX.4.MemInc=DMA_MINC_ENABLE +Dma.UART4_RX.4.Mode=DMA_NORMAL +Dma.UART4_RX.4.PeriphDataAlignment=DMA_PDATAALIGN_BYTE +Dma.UART4_RX.4.PeriphInc=DMA_PINC_DISABLE +Dma.UART4_RX.4.Priority=DMA_PRIORITY_LOW +Dma.UART4_RX.4.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority +Dma.UART4_TX.5.Direction=DMA_MEMORY_TO_PERIPH +Dma.UART4_TX.5.Instance=DMA2_Channel5 +Dma.UART4_TX.5.MemDataAlignment=DMA_MDATAALIGN_BYTE +Dma.UART4_TX.5.MemInc=DMA_MINC_ENABLE +Dma.UART4_TX.5.Mode=DMA_NORMAL +Dma.UART4_TX.5.PeriphDataAlignment=DMA_PDATAALIGN_BYTE +Dma.UART4_TX.5.PeriphInc=DMA_PINC_DISABLE +Dma.UART4_TX.5.Priority=DMA_PRIORITY_LOW +Dma.UART4_TX.5.RequestParameters=Instance,Direction,PeriphInc,MemInc,PeriphDataAlignment,MemDataAlignment,Mode,Priority Dma.USART1_RX.0.Direction=DMA_PERIPH_TO_MEMORY Dma.USART1_RX.0.Instance=DMA1_Channel5 Dma.USART1_RX.0.MemDataAlignment=DMA_MDATAALIGN_BYTE @@ -53,34 +73,38 @@ Mcu.IP1=NVIC Mcu.IP2=RCC Mcu.IP3=SPI2 Mcu.IP4=SYS -Mcu.IP5=USART1 -Mcu.IP6=USART2 -Mcu.IP7=USART3 -Mcu.IPNb=8 +Mcu.IP5=UART4 +Mcu.IP6=USART1 +Mcu.IP7=USART2 +Mcu.IP8=USART3 +Mcu.IPNb=9 Mcu.Name=STM32F103V(C-D-E)Tx Mcu.Package=LQFP100 Mcu.Pin0=OSC_IN Mcu.Pin1=OSC_OUT -Mcu.Pin10=PB13 -Mcu.Pin11=PB14 -Mcu.Pin12=PB15 -Mcu.Pin13=PD8 -Mcu.Pin14=PD9 -Mcu.Pin15=PD10 -Mcu.Pin16=PA9 -Mcu.Pin17=PA10 -Mcu.Pin18=PA13 -Mcu.Pin19=PA14 -Mcu.Pin2=PA1 -Mcu.Pin20=VP_SYS_VS_Systick -Mcu.Pin3=PA2 -Mcu.Pin4=PA3 -Mcu.Pin5=PB2 -Mcu.Pin6=PE15 -Mcu.Pin7=PB10 -Mcu.Pin8=PB11 -Mcu.Pin9=PB12 -Mcu.PinsNb=21 +Mcu.Pin10=PB12 +Mcu.Pin11=PB13 +Mcu.Pin12=PB14 +Mcu.Pin13=PB15 +Mcu.Pin14=PD8 +Mcu.Pin15=PD9 +Mcu.Pin16=PD10 +Mcu.Pin17=PA9 +Mcu.Pin18=PA10 +Mcu.Pin19=PA13 +Mcu.Pin2=PA0-WKUP +Mcu.Pin20=PA14 +Mcu.Pin21=PC10 +Mcu.Pin22=PC11 +Mcu.Pin23=VP_SYS_VS_Systick +Mcu.Pin3=PA1 +Mcu.Pin4=PA2 +Mcu.Pin5=PA3 +Mcu.Pin6=PB2 +Mcu.Pin7=PE15 +Mcu.Pin8=PB10 +Mcu.Pin9=PB11 +Mcu.PinsNb=24 Mcu.ThirdPartyNb=0 Mcu.UserConstants= Mcu.UserName=STM32F103VCTx @@ -91,6 +115,8 @@ NVIC.DMA1_Channel2_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DMA1_Channel3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DMA1_Channel4_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DMA1_Channel5_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true +NVIC.DMA2_Channel3_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true +NVIC.DMA2_Channel4_5_IRQn=true\:0\:0\:false\:false\:true\:false\:true\:true NVIC.DebugMonitor_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.ForceEnableDMAVector=true NVIC.HardFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false @@ -100,6 +126,7 @@ NVIC.PendSV_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.PriorityGroup=NVIC_PRIORITYGROUP_4 NVIC.SVCall_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false NVIC.SysTick_IRQn=true\:15\:0\:false\:false\:true\:false\:true\:false +NVIC.UART4_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.USART1_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.USART2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true NVIC.USART3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true @@ -108,6 +135,10 @@ OSC_IN.Mode=HSE-External-Oscillator OSC_IN.Signal=RCC_OSC_IN OSC_OUT.Mode=HSE-External-Oscillator OSC_OUT.Signal=RCC_OSC_OUT +PA0-WKUP.GPIOParameters=GPIO_Label +PA0-WKUP.GPIO_Label=DIR4 +PA0-WKUP.Locked=true +PA0-WKUP.Signal=GPIO_Output PA1.GPIOParameters=GPIO_Label PA1.GPIO_Label=DIR2 PA1.Locked=true @@ -142,6 +173,10 @@ PB2.GPIOParameters=GPIO_Label PB2.GPIO_Label=DIR1 PB2.Locked=true PB2.Signal=GPIO_Output +PC10.Mode=Asynchronous +PC10.Signal=UART4_TX +PC11.Mode=Asynchronous +PC11.Signal=UART4_RX PD10.GPIOParameters=PinState,GPIO_Label PD10.GPIO_Label=NET_CS PD10.Locked=true @@ -191,7 +226,7 @@ ProjectManager.ToolChainLocation= ProjectManager.UAScriptAfterPath= ProjectManager.UAScriptBeforePath= ProjectManager.UnderRoot=true -ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true,5-MX_USART2_UART_Init-USART2-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_USART3_UART_Init-USART3-false-HAL-true +ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_USART1_UART_Init-USART1-false-HAL-true,5-MX_USART2_UART_Init-USART2-false-HAL-true,6-MX_SPI2_Init-SPI2-false-HAL-true,7-MX_USART3_UART_Init-USART3-false-HAL-true,8-MX_UART4_Init-UART4-false-HAL-true RCC.ADCFreqValue=36000000 RCC.AHBFreq_Value=72000000 RCC.APB1CLKDivider=RCC_HCLK_DIV2 @@ -223,6 +258,8 @@ SPI2.Direction=SPI_DIRECTION_2LINES SPI2.IPParameters=VirtualType,Mode,Direction,CalculateBaudRate SPI2.Mode=SPI_MODE_MASTER SPI2.VirtualType=VM_MASTER +UART4.IPParameters=VirtualMode +UART4.VirtualMode=Asynchronous USART1.IPParameters=VirtualMode USART1.VirtualMode=VM_ASYNC USART2.IPParameters=VirtualMode