ABZ 编码器驱动编写

This commit is contained in:
Michael Chemic 2024-07-26 14:51:23 +08:00
parent 12dd9a4825
commit eb0005f58f
72 changed files with 3476 additions and 3190 deletions

View File

@ -59,6 +59,7 @@ void DMA1_Channel1_IRQHandler(void);
void DMA1_Channel2_IRQHandler(void);
void DMA1_Channel3_IRQHandler(void);
void DMA1_Channel4_IRQHandler(void);
void TIM2_IRQHandler(void);
void TIM3_IRQHandler(void);
void EXTI15_10_IRQHandler(void);
/* USER CODE BEGIN EFP */

View File

@ -53,7 +53,7 @@
/* USER CODE BEGIN PTD */
// 根据不同电机参数设置
int PP = 12; // pole_pairs极对数 磁极数/2
int PP = 1; // pole_pairs极对数 磁极数/2
int DIR = 1; // 无刷电机纠偏旋转方向
extern float raw_angle; // 获取AS5600原始角度值。
@ -131,9 +131,9 @@ void SystemClock_Config(void);
/* USER CODE END 0 */
/**
* @brief The application entry point.
* @retval int
*/
* @brief The application entry point.
* @retval int
*/
int main(void)
{
@ -176,28 +176,30 @@ int main(void)
MX_TIM3_Init();
/* USER CODE BEGIN 2 */
// HAL_TIM_Base_Start_IT(&htim3);
// 配置 NVIC 中断优先级和使能
// HAL_NVIC_SetPriority(TIM3_IRQn, 0, 0);
HAL_NVIC_SetPriority(TIM3_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TIM3_IRQn);
HAL_NVIC_SetPriority(TIM2_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TIM2_IRQn);
// HAL_NVIC_EnableIRQ(TIM3_IRQn);
// 定义ADC滤波器结构体
// ADC_Filter_t adc_filter;
// 初始化滤波器
// 初始化电机M1 ADC1滤波器
ADC_Filter_Init(&adc1_filter_Ia);
ADC_Filter_Init(&adc1_filter_Ib);
ADC_Filter_Init(&adc1_filter_Ic);
FOC_Init(voltage_power_supply); // 设置电源电压。
FOC_AS5600_Init(PP, DIR); // 极对数,正补偿方向。
TIM2_M1_ABZ(); // TIM2 ABZ编码器接口初始化。
TIM3_M2_ABZ(); // TIM2 ABZ编码器接口初始化。
TIM2_M1_ABZ(); // TIM2 ABZ编码器接口初始化并启动。
TIM3_M2_ABZ(); // TIM3 ABZ编码器接口初始化并启动。
// G474可以带两路电机此处控制DRV8301 EN脚。
HAL_GPIO_WritePin(M1_EN_GPIO_Port, M1_EN_Pin, GPIO_PIN_SET);
HAL_GPIO_WritePin(M2_EN_GPIO_Port, M2_EN_Pin, GPIO_PIN_SET);
// char *msg = "Hello, World!\r\n";//串口1发送测试
/* USER CODE END 2 */
/* Infinite loop */
/* USER CODE BEGIN WHILE */
@ -206,61 +208,52 @@ int main(void)
/* USER CODE END WHILE */
/* USER CODE BEGIN 3 */
// HAL_UART_Transmit(&huart1, (uint8_t*)msg, strlen(msg), HAL_MAX_DELAY);//串口1发送测试
// HAL_Delay(1000); // 1 second delay
// volatile int speed=100;
// if (AS5600_ReadRawAngle(&hi2c1, &raw_angle) == HAL_OK)
// {
// Set_Angle(5); // 位置闭环。
// Set_Speed(speed);// 速度闭环。
// }
// UpdataEncoderCnt();
// Count_M1_ABZ();//ABZ调试计数
Count_M2_ABZ();
// ADC debug
// Send_ADC1_Values(&huart1);
// Read_ADC3_Values();//电源电压采集测试。
// 读取新的ADC值假设Read_ADC_Value()是你获取ADC值的函数
// Open_Loop_Control(1.0f, -0.1f); // 开环控制顺时针,设置电压和速度。
// Open_Loop_Control(1.0f, -0.01f); // 开环控制逆时针,设置电压和速度。
// UpdataEncoderCnt();
// Read_ADC3_Values();//电源电压采集测试。
// Read_ADC2_Values();//电源电压采集测试。
// UART debug
// HAL_UART_Transmit(&huart1, (uint8_t*)msg, strlen(msg), HAL_MAX_DELAY);//串口1发送测试
// HAL_Delay(1000); // 1 second delay
// Read_ADC1_Values();//电源电压采集测试。
// HAL_Delay(1);
volatile int speed=1;
if (AS5600_ReadRawAngle(&hi2c1, &raw_angle) == HAL_OK)
{
//Set_Angle(10); // 位置闭环。
Set_Speed(speed);// 速度闭环。
}
// openloop debug
// Current_Speed(2.0f, 0.1f);
// Open_Loop_Control(0.2f, -0.1f); // 开环控制顺时针,设置电压和速度。
// Open_Loop_Control(1.0f, -0.01f); // 开环控制逆时针,设置电压和速度。
// Read_ADC2_Values();
// ABZ编码器debug
UpdateEncoderCnt();
// Count_M1_ABZ();
// Count_M2_ABZ();//开发板只预留了M2 的ABZ编码器接口。
// HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_SET);
// HAL_Delay(10);
// HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET);
// HAL_Delay(10);
}
/* USER CODE END 3 */
}
/**
* @brief System Clock Configuration
* @retval None
*/
* @brief System Clock Configuration
* @retval None
*/
void SystemClock_Config(void)
{
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};
/** Configure the main internal regulator output voltage
*/
*/
HAL_PWREx_ControlVoltageScaling(PWR_REGULATOR_VOLTAGE_SCALE1_BOOST);
/** Initializes the RCC Oscillators according to the specified parameters
* in the RCC_OscInitTypeDef structure.
*/
* in the RCC_OscInitTypeDef structure.
*/
RCC_OscInitStruct.OscillatorType = RCC_OSCILLATORTYPE_HSI;
RCC_OscInitStruct.HSIState = RCC_HSI_ON;
RCC_OscInitStruct.HSICalibrationValue = RCC_HSICALIBRATION_DEFAULT;
@ -277,8 +270,9 @@ void SystemClock_Config(void)
}
/** Initializes the CPU, AHB and APB buses clocks
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK | RCC_CLOCKTYPE_SYSCLK | RCC_CLOCKTYPE_PCLK1 | RCC_CLOCKTYPE_PCLK2;
*/
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_HCLK|RCC_CLOCKTYPE_SYSCLK
|RCC_CLOCKTYPE_PCLK1|RCC_CLOCKTYPE_PCLK2;
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_PLLCLK;
RCC_ClkInitStruct.AHBCLKDivider = RCC_SYSCLK_DIV1;
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
@ -295,9 +289,9 @@ void SystemClock_Config(void)
/* USER CODE END 4 */
/**
* @brief This function is executed in case of error occurrence.
* @retval None
*/
* @brief This function is executed in case of error occurrence.
* @retval None
*/
void Error_Handler(void)
{
/* USER CODE BEGIN Error_Handler_Debug */
@ -309,14 +303,14 @@ void Error_Handler(void)
/* USER CODE END Error_Handler_Debug */
}
#ifdef USE_FULL_ASSERT
#ifdef USE_FULL_ASSERT
/**
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
* @brief Reports the name of the source file and the source line number
* where the assert_param error has occurred.
* @param file: pointer to the source file name
* @param line: assert_param error line source number
* @retval None
*/
void assert_failed(uint8_t *file, uint32_t line)
{
/* USER CODE BEGIN 6 */

View File

@ -59,6 +59,7 @@ extern DMA_HandleTypeDef hdma_adc1;
extern DMA_HandleTypeDef hdma_adc2;
extern DMA_HandleTypeDef hdma_adc3;
extern DMA_HandleTypeDef hdma_usart1_tx;
extern TIM_HandleTypeDef htim2;
extern TIM_HandleTypeDef htim3;
/* USER CODE BEGIN EV */
@ -258,6 +259,20 @@ void DMA1_Channel4_IRQHandler(void)
/* USER CODE END DMA1_Channel4_IRQn 1 */
}
/**
* @brief This function handles TIM2 global interrupt.
*/
void TIM2_IRQHandler(void)
{
/* USER CODE BEGIN TIM2_IRQn 0 */
/* USER CODE END TIM2_IRQn 0 */
HAL_TIM_IRQHandler(&htim2);
/* USER CODE BEGIN TIM2_IRQn 1 */
/* USER CODE END TIM2_IRQn 1 */
}
/**
* @brief This function handles TIM3 global interrupt.
*/

View File

@ -387,6 +387,9 @@ void HAL_TIM_Encoder_MspInit(TIM_HandleTypeDef* tim_encoderHandle)
GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
/* TIM2 interrupt Init */
HAL_NVIC_SetPriority(TIM2_IRQn, 0, 0);
HAL_NVIC_EnableIRQ(TIM2_IRQn);
/* USER CODE BEGIN TIM2_MspInit 1 */
/* USER CODE END TIM2_MspInit 1 */
@ -559,6 +562,8 @@ void HAL_TIM_Encoder_MspDeInit(TIM_HandleTypeDef* tim_encoderHandle)
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_3);
/* TIM2 interrupt Deinit */
HAL_NVIC_DisableIRQ(TIM2_IRQn);
/* USER CODE BEGIN TIM2_MspDeInit 1 */
/* USER CODE END TIM2_MspDeInit 1 */

View File

@ -1,10 +1,19 @@
#include "tim.h"
#include "ABZ.h"
#include "foc.h"
#include "math.h"
int realCnt = 0;
//此驱动按照AS5600驱动中的函数编写
ABZ_Encoder encoderDef;
// ABZ 正交编码器的每转脉冲数
#define ENCODER_PULSES_PER_REV 4096
// 定时器周期 (秒)
#define TIMER_PERIOD 1.0f
int realCnt = 0; // 真实编码器计数值
ABZ_Encoder encoderDef; //encoderDef结构体声明
// 变量声明
volatile int32_t ABZ_pulse_count = 0;
@ -12,18 +21,31 @@ volatile int32_t ABZ_prev_pulse_count = 0;
volatile float ABZ_speed = 0.0f;
volatile float ABZ_angle = 0.0f;
// 假设编码器的每转脉冲数
#define ENCODER_PULSES_PER_REV 4096
/////////////////////////////////////////////////////////////////////
//此处适用的定时器时间戳计算速度
float ABZ_full_rotations; // 当前旋转圈数
float ABZ_raw_angle = 0; // 角度弧度传参值
unsigned long ABZ_angle_prev_ts; // 上次的运行时间
unsigned long ABZ_vel_angle_prev_ts; // 上次的运行时间
unsigned long ABZ_angle_prev_ts; // 上次的运行时间
unsigned long ABZ_vel_angle_prev_ts; // 上次的运行时间
float ABZ_angle_prev_Velocity; // 上次角度(用于速度环)
float ABZ_vel_angle_prev_Velocity; // 上次角度(用于速度环)
int32_t ABZ_encoder_count = 0; // 读取当前编码器计数值
int32_t ABZ_prev_encoder_count = 0; // 读取上次编码器计数值
// 定时器周期 (秒)
#define TIMER_PERIOD 1.0f
void TIM2_M1_ABZ(void)
{
// 启动编码器模式
HAL_TIM_Encoder_Start(&htim2, TIM_CHANNEL_ALL);
// 启动索引中断
// 启动索引中断,检测到ABZ编码器Z信号就重置计数器。
HAL_TIMEx_EnableEncoderIndex(&htim2);
}
@ -32,10 +54,14 @@ void TIM3_M2_ABZ(void)
// 启动编码器模式
HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_ALL);
// 启动索引中断
// 启动索引中断,检测到ABZ编码器Z信号就重置计数器。
HAL_TIMEx_EnableEncoderIndex(&htim3);
}
/**
* @brief
*
*/
void Count_M1_ABZ(void)
{
// Debug读取编码器计数值
@ -48,91 +74,138 @@ void Count_M2_ABZ(void)
volatile int32_t encoder_count = __HAL_TIM_GET_COUNTER(&htim3);
}
//// 中断服务函数
// void HAL_TIMEx_EncoderIndexCallback(TIM_HandleTypeDef *htim)
//{
// // 电机速度和角度计算
// void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
// {
// if (htim->Instance == TIM3)
// {
// // 索引信号中断处理逻辑
// // 可以在这里重置编码器计数值,或者记录当前计数值
// __HAL_TIM_SET_COUNTER(htim, 0);
// // printf("Encoder Index detected!\r\n");
// // 获取当前脉冲计数
// ABZ_pulse_count = __HAL_TIM_GET_COUNTER(&htim3);
// // 计算脉冲增量
// int32_t pulse_delta = ABZ_pulse_count - ABZ_prev_pulse_count;
// // 计算速度 (PPS: 脉冲每秒)
// // 假设定时器周期为1秒则速度为脉冲增量
// ABZ_speed = (float)pulse_delta / TIMER_PERIOD;
// // 计算角度 (单位:度)
// // 角度 = 当前计数值 / 每转脉冲数 * 360度
// ABZ_angle = (float)((ABZ_pulse_count % ENCODER_PULSES_PER_REV + ENCODER_PULSES_PER_REV) % ENCODER_PULSES_PER_REV) / ENCODER_PULSES_PER_REV * 360.0f;
// // 更新上次脉冲计数
// ABZ_prev_pulse_count = ABZ_pulse_count;
// // 清除定时器更新中断标志
// __HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE);
// }
// }
// 电机速度和角度计算
void HAL_TIM_PeriodElapsedCallback(TIM_HandleTypeDef *htim)
{
if (htim->Instance == TIM3)
{
// 清除定时器更新中断标志
__HAL_TIM_CLEAR_FLAG(htim, TIM_FLAG_UPDATE);
// 获取当前脉冲计数
ABZ_pulse_count = __HAL_TIM_GET_COUNTER(&htim3);
//定时器中断方法计算速度
// int UpdateEncoderCnt(void)
// {
// // 启动编码器模式
// HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_ALL);
// 计算脉冲增量
int32_t pulse_delta = ABZ_pulse_count - ABZ_prev_pulse_count;
// // 启动索引中断
// HAL_TIMEx_EnableEncoderIndex(&htim3);
// 计算速度 (PPS: 脉冲每秒)
// 假设定时器周期为1秒则速度为脉冲增量
ABZ_speed = (float)pulse_delta / TIMER_PERIOD;
// // 获取电机读数
// encoderDef.cnt = (int32_t)__HAL_TIM_GET_COUNTER(&htim3);
// 计算角度 (单位:度)
// 角度 = 当前计数值 / 每转脉冲数 * 360度
ABZ_angle = (float)(ABZ_pulse_count % ENCODER_PULSES_PER_REV) / ENCODER_PULSES_PER_REV * 360.0f;
// // 计算电机偏移量
// encoderDef.incCnt = ModifyIncCnt(encoderDef.cnt - encoderDef.preCnt);
// // 更新上次脉冲计数
// encoderDef.preCnt = encoderDef.cnt;
// 更新上次脉冲计数
ABZ_prev_pulse_count = ABZ_pulse_count;
}
}
// // 获取真实的编码器计数值
// realCnt = encoderDef.cnt - encoderDef.offsetCnt;
int UpdataEncoderCnt(void)
{
// 启动编码器模式
HAL_TIM_Encoder_Start(&htim3, TIM_CHANNEL_ALL);
// // 当计数值为负数时,加上一圈的计数数
// while (realCnt < 0)
// {
// realCnt += ENCODER_PULSES_PER_REV * 4;
// }
// 启动索引中断
HAL_TIMEx_EnableEncoderIndex(&htim3);
// 获取电机读数
// // 计算真实的角度值
// encoderDef.angle = realCnt * 2 * PI / ENCODER_PULSES_PER_REV / 4;
encoderDef.cnt = (int32_t)__HAL_TIM_GET_COUNTER(&htim3);
// // 计算电角度
// encoderDef.elecAngle = _normalizeAngle(encoderDef.angle);
encoderDef.preCnt = encoderDef.cnt;
// 计算电机偏移量
encoderDef.incCnt = ModifyIncCnt(encoderDef.cnt - encoderDef.preCnt);
// 获取真实的编码器计数值
realCnt = encoderDef.cnt - encoderDef.offsetCnt;
// 当计数值为负数时,加上一圈的计数数
while (realCnt < 0)
{
realCnt += ENCODER_PULSES_PER_REV * 4;
}
// 计算真实的角度值
encoderDef.angle = encoderDef.cnt * 2 * PI / ENCODER_PULSES_PER_REV / 4;
// 计算电角度
encoderDef.elecAngle = _normalizeAngle(encoderDef.angle);
// 返回编码器读数
return encoderDef.cnt;
}
//// 3. 定义中断服务程序
// void TIM3_IRQHandler(void)
//{
// HAL_TIM_IRQHandler(&htim3);
// // 返回编码器读数
// return encoderDef.cnt;
// }
int16_t ModifyIncCnt(int16_t delta)
// int16_t ModifyIncCnt(int16_t delta)
// {
// // 如果增量超过了一半计数范围,说明是溢出,需要进行调整
// if (delta > ENCODER_HALF_COUNT)
// {
// delta -= (ENCODER_MAX_COUNT + 1);
// }
// else if (delta < -ENCODER_HALF_COUNT)
// {
// delta += (ENCODER_MAX_COUNT + 1);
// }
// return delta;
// }
///////////////////////////////////////////////////////////////////////////////
// 把原始值解算成编码器360°值
float ABZ_GetAngle360(void)
{
// 如果增量超过了一半计数范围,说明是溢出,需要进行调整
if (delta > ENCODER_HALF_COUNT)
{
delta -= (ENCODER_MAX_COUNT + 1);
}
else if (delta < -ENCODER_HALF_COUNT)
{
delta += (ENCODER_MAX_COUNT + 1);
}
return delta;
ABZ_encoder_count = __HAL_TIM_GET_COUNTER(&htim3);
ABZ_raw_angle = ABZ_encoder_count;
return ABZ_raw_angle * 0.08789f; // 将原始值转换为0-360°的角度,4096*0.08789≈360°
}
// 读取磁编码器归一化弧度值:(0-6.28)
float ABZ_GetAngle2PI(void)
{
ABZ_encoder_count = __HAL_TIM_GET_COUNTER(&htim3);
ABZ_raw_angle = ABZ_encoder_count;
return ABZ_raw_angle * 0.08789f / 57.32484f; // 将原始值转换为0-2π的弧度
}
// 磁编码器弧度制角度累计计算:(0-∞)
float ABZ_GetAngle(void)
{
float val = ABZ_GetAngle2PI(); // 获取当前弧度
float d_angle = val - ABZ_prev_encoder_count; // 计算角度变化
// 计算旋转的圈数
// 通过判断角度变化是否大于80%的一圈(0.8f*6.28318530718f)来判断是否发生了溢出
// 如果发生了溢出,则将full_rotations增加1(如果d_angle小于0)或减少1(如果d_angle大于0)
if (fabs(d_angle) > (0.8f * 6.28318530718f))
ABZ_full_rotations += (d_angle > 0) ? -1 : 1; // 根据角度变化方向调整旋转圈数
ABZ_prev_encoder_count = val; // 更新上次角度
return (float)ABZ_full_rotations * 6.28318530718f + ABZ_prev_encoder_count; // 返回累计角度
}
// 磁编码器速度计算:(0-∞)
float ABZ_GetVelocity(void)
{
float Ts, vel = 0.0f; // Ts为采样时间vel为速度
// 计算采样时间
ABZ_angle_prev_ts = SysTick->VAL; // 获取当前时间戳
if (ABZ_angle_prev_ts < ABZ_vel_angle_prev_ts)
Ts = (float)(ABZ_vel_angle_prev_ts - ABZ_angle_prev_ts); // 计算时间差
else
Ts = (float)(0xFFFFFF - ABZ_angle_prev_ts + ABZ_vel_angle_prev_ts); // 处理时间戳溢出情况
// 快速修复微小溢出
if (Ts == 0 || Ts > 0.5f)
Ts = 1e-3f; // 防止采样时间为0或过大
ABZ_angle_prev_Velocity = ABZ_GetAngle(); // 获取当前角度
vel = (ABZ_angle_prev_Velocity - ABZ_vel_angle_prev_Velocity) / Ts; // 计算速度
ABZ_vel_angle_prev_Velocity = ABZ_angle_prev_Velocity; // 更新上次角度
ABZ_vel_angle_prev_ts = ABZ_angle_prev_ts; // 更新上次时间戳
return vel; // 返回速度
}

View File

@ -6,12 +6,12 @@
#define ENCODER_HALF_COUNT (ENCODER_MAX_COUNT / 2) // 定时器计数器的中间值
typedef struct{
int16_t preCnt;
int16_t cnt;
int16_t offsetCnt;
int16_t angle;
int16_t elecAngle;
int16_t incCnt;
int32_t preCnt;
int32_t cnt;
int32_t offsetCnt;
int32_t angle;
int32_t elecAngle;
int32_t incCnt;
}ABZ_Encoder;
@ -22,5 +22,11 @@ void TIM3_M2_ABZ(void);
void Count_M2_ABZ(void);
int16_t ModifyIncCnt(int16_t delta);
int UpdataEncoderCnt(void);
int UpdateEncoderCnt(void);
float ABZ_GetAngle360(void);
float ABZ_GetAngle2PI(void);
float ABZ_GetAngle(void);
float ABZ_GetVelocity(void);
#endif

View File

@ -88,6 +88,7 @@ float AS5600_GetVelocity(void)
// 计算采样时间
angle_prev_ts = SysTick->VAL; // 获取当前时间戳
if (angle_prev_ts < vel_angle_prev_ts)
Ts = (float)(vel_angle_prev_ts - angle_prev_ts); // 计算时间差
else
@ -105,44 +106,6 @@ float AS5600_GetVelocity(void)
return vel; // 返回速度
}
//float AS5600_GetVelocity(void)
//{
// float Ts, vel = 0.0f; // Ts为采样时间vel为速度
// // 获取当前时间戳
// uint32_t current_ts = SysTick->VAL;
// // 计算采样时间SysTick->LOAD的值为系统定时器重装值
// if (current_ts < vel_angle_prev_ts)
// Ts = (float)(vel_angle_prev_ts - current_ts) / SysTick->LOAD * 1e-6f; // 计算时间差
// else
// Ts = (float)(0xFFFFFF - current_ts + vel_angle_prev_ts) / SysTick->LOAD * 1e-6f; // 处理时间戳溢出情况
// // 快速修复微小溢出
// if (Ts == 0 || Ts > 0.5f)
// Ts = 1e-3f; // 防止采样时间为0或过大
// // 获取当前角度
// float current_angle = AS5600_GetAngle();
// // 计算角度差值处理角度溢出情况假设角度范围是0到360度
// float angle_diff = current_angle - vel_angle_prev_Velocity;
// if (angle_diff > 180.0f)
// angle_diff -= 360.0f;
// else if (angle_diff < -180.0f)
// angle_diff += 360.0f;
// // 计算速度
// vel = angle_diff / Ts;
// // 更新上次角度和时间戳
// vel_angle_prev_Velocity = current_angle;
// vel_angle_prev_ts = current_ts;
// return vel; // 返回速度
//}
// 磁编码器速度低通滤波计算:(0-∞)
float AS5600_Get_Speed(void)
{

View File

@ -149,14 +149,11 @@ void FOC_AS5600_Init(int _PP, int _DIR)
PP = _PP;
DIR = _DIR;
// setTorque(3, _2PI);
//
//HAL_Delay(3000);
setTorque(3, _2PI);
HAL_Delay(3000);
setTorque(0, _2PI);
zero_electric_angle = _electricalAngle(); // 设置零点角度。
Sensor_Speed = AS5600_Get_Speed(); // 速度初始值计算。
}
@ -218,7 +215,6 @@ void Open_Loop_Control(float Uq, float speed)
// 设置力矩
setTorque(Uq, angle_el);
// 获取当前ADC值
// 调试打印确保ADC值已经被正确读取
// HAL_UART_Transmit(&huart1, "Toggle LED0!\r\n", sizeof("Toggle LED0!\r\n"),10000);

View File

@ -39,8 +39,8 @@ void PID_init() //
pid_speed.err_last = 0.0f; // 上次误差初始化为0
pid_speed.voltage = 0.0f; // 输出电压初始化为0
pid_speed.integral = 0.0f; // 积分项初始化为0
pid_speed.Kp = 0.01f; // 速度环比例系数初始化为0.11
pid_speed.Ki = 0.0001f; // 速度环积分系数初始化为0.005
pid_speed.Kp = 0.002f; // 速度环比例系数初始化为0.11
pid_speed.Ki = 0.0005f; // 速度环积分系数初始化为0.005
pid_speed.Kd = 0.00001f; // 速度环微分系数初始化为0.0008
// 电流环pid

View File

@ -20,8 +20,19 @@
"lowpass_filter.h": "c",
"control.h": "c",
"pid.h": "c",
"string.h": "c"
}
"string.h": "c",
"foc.h": "c"
},
"cmsis-csolution.actions": [
{
"path": "STM32G474RETx_Demo_Blink.csolution.yml",
"target": "STM32G474RETxDemoBlink",
"config": {
"run": "Flash Device",
"debug": "Arm Debugger"
}
}
]
},
"extensions": {}
}

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<cprj schemaVersion="2.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd">
<created timestamp="2024-07-25T13:36:30" tool="csolution 2.4.0"/>
<created timestamp="2024-07-26T14:50:24" tool="csolution 2.4.0"/>
<info isLayer="false">
<description>Automatically generated project</description>

File diff suppressed because one or more lines are too long

View File

@ -148,24 +148,7 @@
<Name>-U004900283232510139353236 -O2254 -SF10000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP (ARM Core") -D00(2BA01477) -L00(0) -TO131090 -TC10000000 -TT10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO31 -FD20000000 -FC1000 -FN1 -FF0STM32G47x-8x_512.FLM -FS08000000 -FL080000 -FP0($$Device:STM32G474RETx$CMSIS\Flash\STM32G47x-8x_512.FLM)</Name>
</SetRegEntry>
</TargetDriverDllRegistry>
<Breakpoint>
<Bp>
<Number>0</Number>
<Type>0</Type>
<LineNumber>140</LineNumber>
<EnabledFlag>1</EnabledFlag>
<Address>134231688</Address>
<ByteObject>0</ByteObject>
<HtxType>0</HtxType>
<ManyObjects>0</ManyObjects>
<SizeOfObject>0</SizeOfObject>
<BreakByAccess>0</BreakByAccess>
<BreakIfRCount>1</BreakIfRCount>
<Filename>..\FOC_Related\ABZ\ABZ.c</Filename>
<ExecCommand></ExecCommand>
<Expression>\\STM32G474RETx_Demo_Blink\../FOC_Related/ABZ/ABZ.c\140</Expression>
</Bp>
</Breakpoint>
<Breakpoint/>
<WatchWindow1>
<Ww>
<count>0</count>
@ -227,6 +210,36 @@
<WinNumber>1</WinNumber>
<ItemText>realCnt,0x0A</ItemText>
</Ww>
<Ww>
<count>12</count>
<WinNumber>1</WinNumber>
<ItemText>val</ItemText>
</Ww>
<Ww>
<count>13</count>
<WinNumber>1</WinNumber>
<ItemText>Sensor_Angle</ItemText>
</Ww>
<Ww>
<count>14</count>
<WinNumber>1</WinNumber>
<ItemText>vel</ItemText>
</Ww>
<Ww>
<count>15</count>
<WinNumber>1</WinNumber>
<ItemText>Sensor_Speed</ItemText>
</Ww>
<Ww>
<count>16</count>
<WinNumber>1</WinNumber>
<ItemText>encoder_count,0x0A</ItemText>
</Ww>
<Ww>
<count>17</count>
<WinNumber>1</WinNumber>
<ItemText>ABZ_pulse_count,0x0A</ItemText>
</Ww>
</WatchWindow1>
<Tracepoint>
<THDelay>0</THDelay>
@ -394,7 +407,7 @@
<GroupNumber>2</GroupNumber>
<FileNumber>9</FileNumber>
<FileType>1</FileType>
<tvExp>1</tvExp>
<tvExp>0</tvExp>
<tvExpOptDlg>0</tvExpOptDlg>
<bDave2>0</bDave2>
<PathWithFileName>../Core/Src/main.c</PathWithFileName>

View File

@ -8,7 +8,7 @@ Copyright (C) 2022 ARM Ltd and ARM Germany GmbH. All rights reserved.
License Information: xxx xxx
xxx
User-based license: Keil MDK Community (non-commercial free of charge)
Valid until: Jun 1 2033. Cached until: Jul 31 2024
Valid until: Jun 1 2033. Cached until: Aug 1 2024
Tool Versions:
Toolchain: Keil MDK Community (non-commercial free of charge Version: 5.37.0.0
@ -24,47 +24,47 @@ Target DLL: STLink\ST-LINKIII-KEIL_SWO.dll V3.0.9.0
Dialog DLL: TCM.DLL V1.56.1.0
<h2>Project:</h2>
C:\Users\Michael_Chemic\Desktop\STM32G474RETx_FOC\STM32G4-DRV8301-FOC\MDK-ARM\STM32G474RETx_Demo_Blink.uvprojx
Project File Date: 07/17/2024
C:\Users\Michael_Chemic\Desktop\STM32G4-DRV8301-FOC\MDK-ARM\STM32G474RETx_Demo_Blink.uvprojx
Project File Date: 07/26/2024
<h2>Output:</h2>
*** Using Compiler 'V6.18', folder: 'D:\Keil_v5\ARM\ARMCLANG\Bin'
Rebuild target 'STM32G474RETx_Demo_Blink'
compiling LowPass_Filter.c...
compiling control.c...
compiling pid.c...
compiling HALL.c...
assembling startup_stm32g474xx.s...
compiling pid.c...
compiling control.c...
compiling LowPass_Filter.c...
compiling main.c...
compiling ABZ.c...
compiling gpio.c...
compiling AS5600.c...
compiling adc.c...
compiling FOC.c...
compiling main.c...
compiling gpio.c...
compiling adc.c...
compiling AS5600.c...
compiling ABZ.c...
compiling dma.c...
compiling fdcan.c...
compiling i2c.c...
compiling usart.c...
compiling i2c.c...
compiling tim.c...
compiling stm32g4xx_ll_adc.c...
compiling stm32g4xx_it.c...
compiling stm32g4xx_hal_msp.c...
compiling stm32g4xx_hal.c...
compiling stm32g4xx_hal_adc_ex.c...
compiling stm32g4xx_hal_rcc.c...
compiling stm32g4xx_hal_adc.c...
compiling stm32g4xx_hal_rcc_ex.c...
compiling stm32g4xx_hal_flash_ramfunc.c...
compiling stm32g4xx_hal_flash.c...
compiling stm32g4xx_hal_adc_ex.c...
compiling stm32g4xx_hal_flash_ex.c...
compiling stm32g4xx_hal_gpio.c...
compiling stm32g4xx_hal_adc.c...
compiling stm32g4xx_hal_exti.c...
compiling stm32g4xx_hal_dma_ex.c...
compiling stm32g4xx_hal_flash.c...
compiling stm32g4xx_hal_gpio.c...
compiling stm32g4xx_hal_dma.c...
compiling stm32g4xx_hal_dma_ex.c...
compiling stm32g4xx_hal_pwr.c...
compiling stm32g4xx_hal_cortex.c...
compiling stm32g4xx_hal_pwr_ex.c...
compiling stm32g4xx_hal_i2c_ex.c...
compiling stm32g4xx_hal_cortex.c...
compiling system_stm32g4xx.c...
compiling stm32g4xx_hal_uart_ex.c...
compiling stm32g4xx_hal_fdcan.c...
@ -73,7 +73,7 @@ compiling stm32g4xx_hal_uart.c...
compiling stm32g4xx_hal_i2c.c...
compiling stm32g4xx_hal_tim.c...
linking...
Program Size: Code=26000 RO-data=880 RW-data=32 ZI-data=3184
Program Size: Code=28208 RO-data=880 RW-data=32 ZI-data=3224
FromELF: creating hex file...
"STM32G474RETx_Demo_Blink\STM32G474RETx_Demo_Blink.axf" - 0 Error(s), 0 Warning(s).
@ -99,7 +99,7 @@ Package Vendor: Keil
* Component: ARM::CMSIS:CORE:5.6.0
Include file: CMSIS/Core/Include/tz_context.h
Build Time Elapsed: 00:00:05
Build Time Elapsed: 00:00:04
</pre>
</body>
</html>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
Dependencies for Project 'STM32G474RETx_Demo_Blink', Target 'STM32G474RETx_Demo_Blink': (DO NOT MODIFY !)
CompilerVersion: 6180000::V6.18::ARMCLANG
F (startup_stm32g474xx.s)(0x6693373A)(--target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -masm=auto -c -gdwarf-4 -Wa,armasm,--pd,"__MICROLIB SETA 1" -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -Wa,armasm,--pd,"__UVISION_VERSION SETA 537" -Wa,armasm,--pd,"_RTE_ SETA 1" -Wa,armasm,--pd,"STM32G474xx SETA 1" -Wa,armasm,--pd,"_RTE_ SETA 1" -o stm32g474retx_demo_blink/startup_stm32g474xx.o)
F (..\FOC_Related\AS5600\AS5600.c)(0x6691F404)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/as5600.o -MD)
F (startup_stm32g474xx.s)(0x66A301E1)(--target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -masm=auto -c -gdwarf-4 -Wa,armasm,--pd,"__MICROLIB SETA 1" -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -Wa,armasm,--pd,"__UVISION_VERSION SETA 537" -Wa,armasm,--pd,"_RTE_ SETA 1" -Wa,armasm,--pd,"STM32G474xx SETA 1" -Wa,armasm,--pd,"_RTE_ SETA 1" -o stm32g474retx_demo_blink/startup_stm32g474xx.o)
F (..\FOC_Related\AS5600\AS5600.c)(0x66A34196)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/as5600.o -MD)
I (..\FOC_Related\AS5600\AS5600.h)(0x668AAA87)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32G4xx_hal.h)(0x66690E8C)
I (..\Core\Inc\stm32g4xx_hal_conf.h)(0x66814B76)
@ -51,7 +51,7 @@ I (..\Core\Inc\usart.h)(0x667E4DDA)
F (..\FOC_Related\CONTROL\control.c)(0x668E17FE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/control.o -MD)
I (..\FOC_Related\CONTROL\control.h)(0x668CB771)
I (../FOC_Related/PID/pid.h)(0x6689F130)
F (..\FOC_Related\FOC\FOC.c)(0x66928254)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/foc.o -MD)
F (..\FOC_Related\FOC\FOC.c)(0x66A268B7)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/foc.o -MD)
I (..\FOC_Related\FOC\FOC.h)(0x668E9D12)
I (..\Core\Inc\usart.h)(0x667E4DDA)
I (..\Core\Inc\main.h)(0x66978768)
@ -146,10 +146,10 @@ I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_tim.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_tim_ex.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart_ex.h)(0x66690E8D)
F (..\FOC_Related\PID\pid.c)(0x6691F941)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/pid.o -MD)
F (..\FOC_Related\PID\pid.c)(0x66A26092)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/pid.o -MD)
I (..\FOC_Related\PID\pid.h)(0x6689F130)
F (..\FOC_Related\HALL\HALL.c)(0x668F847B)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/hall.o -MD)
F (..\FOC_Related\ABZ\ABZ.c)(0x669766F2)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/abz.o -MD)
F (..\FOC_Related\ABZ\ABZ.c)(0x66A34251)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/abz.o -MD)
I (..\Core\Inc\tim.h)(0x668F4350)
I (..\Core\Inc\main.h)(0x66978768)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal.h)(0x66690E8C)
@ -193,10 +193,11 @@ I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart_ex.h)(0x66690E8D)
I (..\FOC_Related\LOWPASS_FILTER\LowPass_Filter.h)(0x668FEFAB)
I (..\Core\Inc\adc.h)(0x668E9191)
I (..\FOC_Related\ABZ\ABZ.h)(0x66976701)
I (..\FOC_Related\ABZ\ABZ.h)(0x66A3095D)
I (..\FOC_Related\FOC\foc.h)(0x668E9D12)
I (..\Core\Inc\usart.h)(0x667E4DDA)
F (../Core/Src/main.c)(0x6699B5ED)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/main.o -MD)
I (D:\Keil_v5\ARM\ARMCLANG\include\math.h)(0x625333C6)
F (../Core/Src/main.c)(0x66A3091D)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/main.o -MD)
I (..\Core\Inc\main.h)(0x66978768)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal.h)(0x66690E8C)
I (..\Core\Inc\stm32g4xx_hal_conf.h)(0x66814B76)
@ -249,7 +250,7 @@ I (..\FOC_Related\FOC\foc.h)(0x668E9D12)
I (..\FOC_Related\AS5600\as5600.h)(0x668AAA87)
I (D:\Keil_v5\ARM\ARMCLANG\include\string.h)(0x625333C6)
I (D:\Keil_v5\ARM\ARMCLANG\include\stdio.h)(0x625333C6)
I (..\FOC_Related\ABZ\ABZ.h)(0x66976701)
I (..\FOC_Related\ABZ\ABZ.h)(0x66A3095D)
F (../Core/Src/gpio.c)(0x668F434C)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/gpio.o -MD)
I (..\Core\Inc\gpio.h)(0x667B9978)
I (..\Core\Inc\main.h)(0x66978768)
@ -513,7 +514,7 @@ I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart_ex.h)(0x66690E8D)
I (..\FOC_Related\LOWPASS_FILTER\LowPass_Filter.h)(0x668FEFAB)
I (..\Core\Inc\adc.h)(0x668E9191)
F (../Core/Src/tim.c)(0x66933736)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/tim.o -MD)
F (../Core/Src/tim.c)(0x66A301DF)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/tim.o -MD)
I (..\Core\Inc\tim.h)(0x668F4350)
I (..\Core\Inc\main.h)(0x66978768)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal.h)(0x66690E8C)
@ -557,7 +558,7 @@ I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart_ex.h)(0x66690E8D)
I (..\FOC_Related\LOWPASS_FILTER\LowPass_Filter.h)(0x668FEFAB)
I (..\Core\Inc\adc.h)(0x668E9191)
F (../Core/Src/stm32g4xx_it.c)(0x66933736)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/stm32g4xx_it.o -MD)
F (../Core/Src/stm32g4xx_it.c)(0x66A301E0)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/stm32g4xx_it.o -MD)
I (..\Core\Inc\main.h)(0x66978768)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal.h)(0x66690E8C)
I (..\Core\Inc\stm32g4xx_hal_conf.h)(0x66814B76)
@ -600,7 +601,7 @@ I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart.h)(0x66690E8D)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart_ex.h)(0x66690E8D)
I (..\FOC_Related\LOWPASS_FILTER\LowPass_Filter.h)(0x668FEFAB)
I (..\Core\Inc\adc.h)(0x668E9191)
I (..\Core\Inc\stm32g4xx_it.h)(0x66933736)
I (..\Core\Inc\stm32g4xx_it.h)(0x66A301E0)
F (../Core/Src/stm32g4xx_hal_msp.c)(0x667B9978)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -c -fno-rtti -funsigned-char -fshort-enums -fshort-wchar -D__MICROLIB -gdwarf-4 -O3 -ffunction-sections -Wno-packed -Wno-missing-variable-declarations -Wno-missing-prototypes -Wno-missing-noreturn -Wno-sign-conversion -Wno-nonportable-include-path -Wno-reserved-id-macro -Wno-unused-macros -Wno-documentation-unknown-command -Wno-documentation -Wno-license-management -Wno-parentheses-equality -Wno-reserved-identifier -I ../Core/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc -I ../Drivers/STM32G4xx_HAL_Driver/Inc/Legacy -I ../Drivers/CMSIS/Device/ST/STM32G4xx/Include -I ../Drivers/CMSIS/Include -I ../FOC_Related/CONTROL -I ../FOC_Related/AS5600 -I ../FOC_Related/FOC -I ../FOC_Related/LOWPASS_FILTER -I ../FOC_Related/PID -I ../FOC_Related/ABZ -I ../FOC_Related/HALL -I./RTE/_STM32G474RETx_Demo_Blink -ID:/Software/Arm/Packs/ARM/CMSIS/5.9.0/CMSIS/Core/Include -ID:/Software/Arm/Packs/Keil/STM32G4xx_DFP/1.6.0/Drivers/CMSIS/Device/ST/STM32G4xx/Include -D__UVISION_VERSION="537" -D_RTE_ -DSTM32G474xx -D_RTE_ -DUSE_HAL_DRIVER -DSTM32G474xx -o stm32g474retx_demo_blink/stm32g4xx_hal_msp.o -MD)
I (..\Core\Inc\main.h)(0x66978768)
I (..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal.h)(0x66690E8C)

View File

@ -40,4 +40,5 @@ stm32g474retx_demo_blink/abz.o: ..\FOC_Related\ABZ\ABZ.c \
..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart.h \
..\Drivers\STM32G4xx_HAL_Driver\Inc\stm32g4xx_hal_uart_ex.h \
..\FOC_Related\LOWPASS_FILTER\LowPass_Filter.h ..\Core\Inc\adc.h \
..\FOC_Related\ABZ\ABZ.h ..\FOC_Related\FOC\foc.h ..\Core\Inc\usart.h
..\FOC_Related\ABZ\ABZ.h ..\FOC_Related\FOC\foc.h ..\Core\Inc\usart.h \
D:\Keil_v5\ARM\ARMCLANG\Bin\..\include\math.h

View File

@ -1,46 +1,47 @@
# ninja log v6
42 490 7435158237926254 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/adc.o 2b16f43dfe55302e
74 540 7435158238246282 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/dma.o a41bd06d8a9cd804
1231 1934 7435158249830086 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pwr.o 423ff85f281b7935
107 591 7435158238586267 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/fdcan.o 90905e4fa0b37e80
74 540 7435158238246282 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/dma.o a41bd06d8a9cd804
89 498 7436621126708236 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/stm32g4xx_it.o a8fa77ac47c8353c
10 284 7436796017947571 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/main.o c37beb02a0084cec
142 643 7435158238924142 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/gpio.o dfb84a660c2a450b
22 549 7435371133122182 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/main.o c37beb02a0084cec
305 844 7435158240554157 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/stm32g4xx_it.o a8fa77ac47c8353c
177 692 7435158239284148 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/i2c.o 4383b003ca70ae35
79 321 7436783929764065 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/AS5600/AS5600.o cb268871de2d1ec4
11 379 7436621125928271 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/MDK-ARM/startup_stm32g474xx.o ce0f651a98b4408
263 791 7435158240144158 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/stm32g4xx_hal_msp.o b41d7983174e2003
12 1583 7435158237626251 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/MDK-ARM/startup_stm32g474xx.o ce0f651a98b4408
1851 2695 7435158256018170 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/AS5600/AS5600.o cb268871de2d1ec4
348 894 7435158240999302 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/system_stm32g4xx.o 4fec1b3e7c85bd7
392 948 7435158241429334 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/tim.o fdb35918c06faa5e
492 1054 7435158242435242 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal.o 230a507fd3ba92bb
438 1001 7435158241889338 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/usart.o 4f57dd2906a0970
129 567 7436621127108241 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/tim.o fdb35918c06faa5e
1289 2030 7435158250400036 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_pwr_ex.o 98307b29a74e4082
438 1001 7435158241889338 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/Core/Src/usart.o 4f57dd2906a0970
643 1115 7435158243946640 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_cortex.o fb606a4daddd2207
743 1174 7435158244949479 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma_ex.o 2d28c2be9c3f0fb2
692 1231 7435158244438578 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma.o 31203deefea42e5f
895 1458 7435158246460266 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash.o 5daba7be0c1b912d
792 1289 7435158245430518 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_exti.o 227cb1af7aeee7ce
692 1231 7435158244438578 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_dma.o 31203deefea42e5f
2175 2687 7435158259262278 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/LOWPASS_FILTER/LowPass_Filter.o 31c4c8f2c02bf422
592 1339 7435158243432535 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_adc_ex.o 2acf61bd3168fab0
792 1289 7435158245430518 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_exti.o 227cb1af7aeee7ce
1055 1766 7435158248057360 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_gpio.o 5c0f49e5d633feb2
592 1339 7435158243432535 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_adc_ex.o 2acf61bd3168fab0
540 1391 7435158242905197 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_adc.o edf3e9e7517f5484
1001 1519 7435158247522960 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ramfunc.o 22f1f1a4763b7a50
948 1640 7435158246985493 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_flash_ex.o ae5cfc810fe2df0d
844 1699 7435158245955694 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_fdcan.o c2d0116637dcef2c
1175 1851 7435158249260039 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_i2c_ex.o 20c921daf914de21
844 1699 7435158245955694 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_fdcan.o c2d0116637dcef2c
1339 2090 7435158250907344 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rcc.o 8a82099ae367604c
1699 2175 7435158254503805 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_ll_adc.o d042895c0af8295
48 302 7436796018327564 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/ABZ/ABZ.o 69e8e40a68619a60
1392 2235 7435158251422519 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_rcc_ex.o 27b60fa4a4167cf
1767 2451 7435158255181636 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/ABZ/ABZ.o 69e8e40a68619a60
1640 2340 7435158253911424 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart_ex.o c1d88f4fda0f9503
1934 2517 7435158256851052 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/CONTROL/control.o 9b25df407dcdace4
2090 2525 7435158258412009 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/HALL/HALL.o 569705b12a38f301
2236 2604 7435158259869326 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/PID/pid.o 6e3c466a93da03af
2030 2788 7435158257807921 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/FOC/FOC.o 6b3ce60af500247b
125 429 7436224136839763 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/PID/pid.o 6e3c466a93da03af
216 631 7436621127978163 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/FOC/FOC.o 6b3ce60af500247b
1520 2789 7435158252708088 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_tim_ex.o 53082ad31c182864
1116 2835 7435158248668738 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_i2c.o 1b7530196ab88eca
1583 2934 7435158253344560 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_uart.o 4495500b23fa23e5
1459 3030 7435158252098110 CMakeFiles/STM32G474RETx_Demo_Blink.dir/6640f704c74bec87956bb9adb54f2f29/Drivers/STM32G4xx_HAL_Driver/Src/stm32g4xx_hal_tim.o fcc92cb73e4d0466
551 887 7435371138414729 C:/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/MDK-ARM/out/STM32G474RETx_Demo_Blink/STM32G474RETxDemoBlink/STM32G474RETx_Demo_Blink.axf a54d3d95e47e8b18
260 385 7436791410059395 C:/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/MDK-ARM/out/STM32G474RETx_Demo_Blink/STM32G474RETxDemoBlink/STM32G474RETx_Demo_Blink.axf a54d3d95e47e8b18
7 99 7435889346634430 CMakeFiles/database 7dba96e7cd4e65ce
7 99 7435889346634430 C:/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/MDK-ARM/tmp/STM32G474RETx_Demo_Blink/STM32G474RETxDemoBlink/CMakeFiles/database 7dba96e7cd4e65ce
15 317 7436798271107302 CMakeFiles/STM32G474RETx_Demo_Blink.dir/C_/Users/Michael_Chemic/Desktop/STM32G4-DRV8301-FOC/FOC_Related/ABZ/ABZ.o 69e8e40a68619a60

View File

@ -1,15 +1,16 @@
{
"registries": [
{
"kind": "artifact",
"location": "https://artifacts.tools.arm.com/vcpkg-registry",
"name": "arm"
"kind": "artifact",
"location": "https://artifacts.tools.arm.com/vcpkg-registry",
"name": "arm"
}
],
"requires": {
"arm:tools/kitware/cmake": "^3.25.2",
"arm:tools/ninja-build/ninja": "^1.10.2",
"arm:compilers/arm/armclang": "^6.19.0",
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.3.0"
"arm:tools/open-cmsis-pack/cmsis-toolbox": "^2.3.0",
"arm:debuggers/arm/armdbg": "*"
}
}

View File

@ -59,6 +59,8 @@ You can use it as a sandbox to play with Writerside features, and remove it from
![三角函数复习资料.png](三角函数复习资料.png)
摘自:[](https://www.cnblogs.com/sunsky303/p/17248071.html)
![Clarke变换.png](Clarke变换.png)
3Clarke变换写成矩阵形式

View File

@ -236,6 +236,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\:0\:0\:false\:false\:true\:false\:true\:false
NVIC.TIM2_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.TIM3_IRQn=true\:0\:0\:false\:false\:true\:true\:true\:true
NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false
PA0.Locked=true