Use 115.2kbaud UART
This commit is contained in:
		
							
								
								
									
										16
									
								
								.mxproject
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								.mxproject
									
									
									
									
									
								
							
										
											
												File diff suppressed because one or more lines are too long
											
										
									
								
							@ -18,12 +18,6 @@
 | 
			
		||||
/* USER CODE END Header */
 | 
			
		||||
/* Includes ------------------------------------------------------------------*/
 | 
			
		||||
#include "main.h"
 | 
			
		||||
#include "stm32f3xx_hal.h"
 | 
			
		||||
#include "stm32f3xx_hal_def.h"
 | 
			
		||||
#include "stm32f3xx_hal_gpio.h"
 | 
			
		||||
#include "stm32f3xx_hal_i2c.h"
 | 
			
		||||
#include "stm32f3xx_hal_uart.h"
 | 
			
		||||
#include <string.h>
 | 
			
		||||
 | 
			
		||||
/* Private includes ----------------------------------------------------------*/
 | 
			
		||||
/* USER CODE BEGIN Includes */
 | 
			
		||||
@ -129,6 +123,7 @@ int main(void) {
 | 
			
		||||
  uint16_t temperatures[N_SENSORS];
 | 
			
		||||
  while (1) {
 | 
			
		||||
    /* USER CODE END WHILE */
 | 
			
		||||
 | 
			
		||||
    /* USER CODE BEGIN 3 */
 | 
			
		||||
    GPIO_PinState error_led = (HAL_GetTick() - last_error < ERROR_LED_TIME)
 | 
			
		||||
                                  ? GPIO_PIN_SET
 | 
			
		||||
@ -252,7 +247,7 @@ static void MX_USART2_UART_Init(void) {
 | 
			
		||||
 | 
			
		||||
  /* USER CODE END USART2_Init 1 */
 | 
			
		||||
  huart2.Instance = USART2;
 | 
			
		||||
  huart2.Init.BaudRate = 38400;
 | 
			
		||||
  huart2.Init.BaudRate = 115200;
 | 
			
		||||
  huart2.Init.WordLength = UART_WORDLENGTH_8B;
 | 
			
		||||
  huart2.Init.StopBits = UART_STOPBITS_1;
 | 
			
		||||
  huart2.Init.Parity = UART_PARITY_NONE;
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										64
									
								
								Makefile
									
									
									
									
									
								
							
							
						
						
									
										64
									
								
								Makefile
									
									
									
									
									
								
							@ -1,5 +1,5 @@
 | 
			
		||||
##########################################################################################################################
 | 
			
		||||
# File automatically-generated by tool: [projectgenerator] version: [3.17.1] date: [Mon Jan 16 18:16:19 CET 2023]
 | 
			
		||||
# File automatically-generated by tool: [projectgenerator] version: [3.17.1] date: [Mon Jan 16 21:19:51 CET 2023] 
 | 
			
		||||
##########################################################################################################################
 | 
			
		||||
 | 
			
		||||
# ------------------------------------------------
 | 
			
		||||
@ -35,31 +35,31 @@ BUILD_DIR = build
 | 
			
		||||
# source
 | 
			
		||||
######################################
 | 
			
		||||
# C sources
 | 
			
		||||
C_SOURCES =  \
 | 
			
		||||
Core/Src/main.c \
 | 
			
		||||
Core/Src/stm32f3xx_it.c \
 | 
			
		||||
Core/Src/stm32f3xx_hal_msp.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_i2c.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_i2c_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_gpio.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_dma.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_cortex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_flash.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_flash_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_exti.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_tim.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_tim_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart_ex.c \
 | 
			
		||||
Core/Src/system_stm32f3xx.c  
 | 
			
		||||
C_SOURCES =  \
 | 
			
		||||
Core/Src/main.c \
 | 
			
		||||
Core/Src/stm32f3xx_it.c \
 | 
			
		||||
Core/Src/stm32f3xx_hal_msp.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_i2c.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_i2c_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_rcc_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_gpio.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_dma.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_cortex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_pwr_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_flash.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_flash_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_exti.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_tim.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_tim_ex.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart.c \
 | 
			
		||||
Drivers/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal_uart_ex.c \
 | 
			
		||||
Core/Src/system_stm32f3xx.c
 | 
			
		||||
 | 
			
		||||
# ASM sources
 | 
			
		||||
ASM_SOURCES =  \
 | 
			
		||||
ASM_SOURCES =  \
 | 
			
		||||
startup_stm32f302x8.s
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -103,8 +103,8 @@ MCU = $(CPU) -mthumb $(FPU) $(FLOAT-ABI)
 | 
			
		||||
AS_DEFS = 
 | 
			
		||||
 | 
			
		||||
# C defines
 | 
			
		||||
C_DEFS =  \
 | 
			
		||||
-DUSE_HAL_DRIVER \
 | 
			
		||||
C_DEFS =  \
 | 
			
		||||
-DUSE_HAL_DRIVER \
 | 
			
		||||
-DSTM32F302x8
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -112,11 +112,11 @@ C_DEFS =  \
 | 
			
		||||
AS_INCLUDES = 
 | 
			
		||||
 | 
			
		||||
# C includes
 | 
			
		||||
C_INCLUDES =  \
 | 
			
		||||
-ICore/Inc \
 | 
			
		||||
-IDrivers/STM32F3xx_HAL_Driver/Inc \
 | 
			
		||||
-IDrivers/STM32F3xx_HAL_Driver/Inc/Legacy \
 | 
			
		||||
-IDrivers/CMSIS/Device/ST/STM32F3xx/Include \
 | 
			
		||||
C_INCLUDES =  \
 | 
			
		||||
-ICore/Inc \
 | 
			
		||||
-IDrivers/STM32F3xx_HAL_Driver/Inc \
 | 
			
		||||
-IDrivers/STM32F3xx_HAL_Driver/Inc/Legacy \
 | 
			
		||||
-IDrivers/CMSIS/Device/ST/STM32F3xx/Include \
 | 
			
		||||
-IDrivers/CMSIS/Include
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -189,4 +189,4 @@ clean:
 | 
			
		||||
#######################################
 | 
			
		||||
-include $(wildcard $(BUILD_DIR)/*.d)
 | 
			
		||||
 | 
			
		||||
# *** EOF ***
 | 
			
		||||
# *** EOF ***
 | 
			
		||||
 | 
			
		||||
@ -174,7 +174,8 @@ RCC.USBFreq_Value=64000000
 | 
			
		||||
RCC.VCOOutput2Freq_Value=4000000
 | 
			
		||||
SH.GPXTI13.0=GPIO_EXTI13
 | 
			
		||||
SH.GPXTI13.ConfNb=1
 | 
			
		||||
USART2.IPParameters=VirtualMode-Asynchronous
 | 
			
		||||
USART2.BaudRate=115200
 | 
			
		||||
USART2.IPParameters=VirtualMode-Asynchronous,BaudRate
 | 
			
		||||
USART2.VirtualMode-Asynchronous=VM_ASYNC
 | 
			
		||||
VP_SYS_VS_Systick.Mode=SysTick
 | 
			
		||||
VP_SYS_VS_Systick.Signal=SYS_VS_Systick
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user