FIX&ENH: rotary driver works!

ADD: three pins for current strength values

FIX: ADC1->ADC2

ENH: prepare for UART

FIX&ADD: add USART print, add extra_script to print floats to COM port #2

ADD: some func #2

Rebuild project structure

ADD: .clang-format file

ENG: use flag

ADD: USART1

FIX: .ioc

FIX: .ioc

ADD: debug script to angle value

ADD: gitlab-ci

ADD: gitlab CI

ADD: gitlab-ci

FIX: gitlab-ci

ADD&FIX: all sensors work! (or not?)
This commit is contained in:
vanyabeat 2024-01-17 19:33:35 +03:00
parent d1b0ed0858
commit 8157b41ea9
23 changed files with 673 additions and 339 deletions

View file

@ -1,21 +1,21 @@
/* USER CODE BEGIN Header */
/**
******************************************************************************
* @file tim.c
* @brief This file provides code for the configuration
* of the TIM instances.
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
******************************************************************************
* @file tim.c
* @brief This file provides code for the configuration
* of the TIM instances.
******************************************************************************
* @attention
*
* Copyright (c) 2024 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* USER CODE END Header */
/* Includes ------------------------------------------------------------------*/
#include "tim.h"
@ -25,7 +25,7 @@
/* USER CODE END 0 */
TIM_HandleTypeDef htim3;
volatile bool tim3_semaphore;
/* TIM1 init function */
void MX_TIM1_Init(void)
{
@ -148,7 +148,7 @@ void MX_TIM3_Init(void)
htim3.Instance = TIM3;
htim3.Init.Prescaler = 89;
htim3.Init.CounterMode = TIM_COUNTERMODE_UP;
htim3.Init.Period = 199;
htim3.Init.Period = 99;
htim3.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1;
htim3.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE;
if (HAL_TIM_Base_Init(&htim3) != HAL_OK)
@ -167,7 +167,11 @@ void MX_TIM3_Init(void)
Error_Handler();
}
/* USER CODE BEGIN TIM3_Init 2 */
if (HAL_TIM_Base_Start_IT(&htim3) != HAL_OK)
{
/* Starting Error */
Error_Handler();
}
/* USER CODE END TIM3_Init 2 */
}