Use 115.2kbaud UART

This commit is contained in:
Jasper Blanckenburg 2023-01-16 21:43:30 +01:00
parent 4ec0cec207
commit 414e2e149d
4 changed files with 44 additions and 48 deletions

File diff suppressed because one or more lines are too long

View File

@ -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;

View File

@ -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]
##########################################################################################################################
# ------------------------------------------------

View File

@ -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