SPI更新

This commit is contained in:
cbb
2025-10-09 21:09:33 +08:00
parent d755715363
commit 2d807260c5
2 changed files with 32 additions and 29 deletions
+8 -7
View File
@@ -3,6 +3,7 @@
#include "Filter.h"
#include "Timer.h"
#include "adc.h"
#include "device/tle5012b.h"
#include "initial.h"
#include "sys/initial.h"
#include "systick.h"
@@ -26,9 +27,7 @@ int main(void) {
tle5012b_gpio_init(); // TLI5012B初始化
tle5012b_spi_init();
// cdd_TLI5012_Init();
cdd_TLI5012_Init(); // 初始化TLE5012B传感器
watchdog_init(1000);
// 初始化CAN回环测试
@@ -38,7 +37,7 @@ int main(void) {
fwdgt_counter_reload();
// can_loopback_test();
// /* value 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",
@@ -47,11 +46,13 @@ int main(void) {
// 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("\n----------------------------------------------------\n");
// printf(" the angle is %2.2f\r\n", tle5012b_read());
printf("\n----------------------------------------------------\n");
delay_1ms(200);
delay_1ms(700);
// TLI5012B测试
// Test_TLI5012B();
Test_TLI5012B();
Set_Pwm(0, 1500);
}