foc/src/App/main.c

46 lines
1.0 KiB
C
Raw Normal View History

2023-08-23 01:43:35 +00:00
/**
* @file main.c
* @author jimingqing
* @date 2023-08-14
* @version 0.0.1
* @copyright XiazhiTech Copyright (c) 2023
*
* @brief
*/
/* Includes ------------------------------------------------------------------*/
#include "main.h"
2023-08-23 15:32:48 +00:00
hall_handle_t hall_handle;
2023-08-29 06:57:24 +00:00
foc_handle_t foc_handle;
2023-08-23 15:32:48 +00:00
2023-08-23 01:43:35 +00:00
/* Function ------------------------------------------------------------------*/
/**
* @brief The application entry point.
* @retval int
*/
int main(void)
{
board_init();
2023-08-29 06:57:24 +00:00
// // FOC控制流程
// foc_handle.Vqd.d = 0;
// foc_handle.Vqd.q = 1;
// // 获取电角度
// // int16_t control_elec_angle = hall_handle.control_elec_angle;
// hall_handle.control_elec_angle++;
// // 计算Valpha Vbeta
// alphabeta_t Valphabeta = math_rev_park(foc_handle.Vqd, hall_handle.control_elec_angle);
// // 计算SVPWM输出
// // svmpw()
2023-08-23 01:43:35 +00:00
while (1)
{
led_ctrl(1);
HAL_Delay(500);
led_ctrl(0);
HAL_Delay(500);
}
}
/* END OF FILE ---------------------------------------------------------------*/