FOC开环调试成功

This commit is contained in:
cbb
2025-10-16 21:43:19 +08:00
parent 2d807260c5
commit 35801d6f48
13 changed files with 704 additions and 509 deletions
+38
View File
@@ -0,0 +1,38 @@
#include "Can.h"
#include "Filter.h"
#include "Timer.h"
#include "adc.h"
#include "core_cm4.h"
#include "device/tle5012b.h"
#include "initial.h"
#include "main.h"
#include "sys/initial.h"
#include "systick.h"
#include "tle5012b.h"
#include <cinttypes>
#include <cstdio>
constexpr int status_print = 0;
void test_1111() {
// 初始化CAN回环测试
// can_loopback_init();
// can_config();
if (status_print) {
/* value print */
printf(" the temperature data is %2.2f degrees Celsius\r\n",
get_mcu_temp());
printf(" the drv_temperature data is %2.2f degrees Celsius\r\n",
get_drv_temp());
printf(" the U current data is %2.2f mA\r\n", get_current('U'));
printf(" the V current data is %2.2f mA\r\n", get_current('V'));
printf(" the W current data is %2.2f mA\r\n", get_current('W'));
printf(" the VBUS is %2.2f V\r\n", get_vbus_voltage());
// printf(" the angle is %2.2f\r\n", tle5012b_read());
printf("\n----------------------------------------------------\n");
// TLI5012B测试
Test_TLI5012B();
}
// can_loopback_test();
}