Browse Source

优化后的最新版本

master
L1ng 2 weeks ago
parent
commit
76b0391e42
  1. 8
      Core/BASE/Protobuf/PSource/bsp_CV.pb.c
  2. 51
      Core/BASE/Protobuf/PSource/bsp_CV.pb.h
  3. 2
      Core/BASE/Protobuf/PSource/bsp_GV.pb.h
  4. 12
      Core/BASE/Protobuf/PSource/bsp_IV.pb.h
  5. 14
      Core/BASE/Protobuf/PSource/bsp_strain_gauge.pb.h
  6. 15
      Core/BASE/Protobuf/Proto/bsp_CV.proto
  7. 3
      Core/BASE/Protobuf/Proto/bsp_IV.proto
  8. 2
      Core/BASE/Protobuf/Proto/bsp_strain_gauge.proto
  9. 16
      Core/BASE/Protobuf/Proto/bsp_strain_gauge.txt
  10. 14
      Core/BASE/Src/BSP/bsp_MB_host.c
  11. 28
      Core/BASE/Src/MSP/msp_PID.c
  12. 4
      Core/BASE/Src/MSP/msp_ground_management.c
  13. 0
      Core/BASE/Src/MSP/msp_strain_gauge.txt
  14. 176
      Core/BASE/Src/MSP/msp_strain_gauge_new.c
  15. 15
      Core/FSM/Src/Handset_Status_Setting.c
  16. 137
      Core/FSM/Src/fsm_state_control.c
  17. 131
      Core/FSM/Src/robot_move_actions.c
  18. 2
      Core/FSM/Src/swing_action.c
  19. 19
      Core/Src/main.c
  20. 2
      Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c
  21. 6
      Swing_Rust_UDPV2.ioc

8
Core/BASE/Protobuf/PSource/bsp_CV.pb.c

@ -10,11 +10,3 @@ PB_BIND(CV_struct_define, CV_struct_define, AUTO)
#ifndef PB_CONVERT_DOUBLE_FLOAT
/* On some platforms (such as AVR), double is really float.
* To be able to encode/decode double on these platforms, you need.
* to define PB_CONVERT_DOUBLE_FLOAT in pb.h or compiler command line.
*/
PB_STATIC_ASSERT(sizeof(double) == 8, DOUBLE_MUST_BE_8_BYTES)
#endif

51
Core/BASE/Protobuf/PSource/bsp_CV.pb.h

@ -14,20 +14,10 @@
/* Struct definitions */
typedef struct _CV_struct_define {
/* 摆臂项目 */
float TT_Motor_1m_per_min; /* 天钛电机1m/min对应要发的参考数值 */
float TT_Motor_one_degree; /* 天钛电机1°对应要发的参考数值 */
float strain_gauge_k; /* 压力传感器的k值 */
float strain_gauge_b; /* 压力传感器的b值 */
float pressure_Max; /* 最大压力值 */
int32_t pulse_Per_Circle; /* 每转多少脉冲 */
int32_t wheel_Reduction_Ratio; /* 减速比 */
double wheel_Diameter_m; /* 车轮直径 m */
bool has_PID_high;
PID_Parameters PID_high;
bool has_PID_mid;
PID_Parameters PID_mid;
bool has_PID_low;
PID_Parameters PID_low;
float angle_offset; /* 陀螺仪角度偏置 */
} CV_struct_define;
@ -36,40 +26,23 @@ extern "C" {
#endif
/* Initializer values for message structs */
#define CV_struct_define_init_default {0, 0, 0, 0, 0, 0, 0, 0, false, PID_Parameters_init_default, false, PID_Parameters_init_default, false, PID_Parameters_init_default}
#define CV_struct_define_init_zero {0, 0, 0, 0, 0, 0, 0, 0, false, PID_Parameters_init_zero, false, PID_Parameters_init_zero, false, PID_Parameters_init_zero}
#define CV_struct_define_init_default {0, 0, 0, 0}
#define CV_struct_define_init_zero {0, 0, 0, 0}
/* Field tags (for use in manual encoding/decoding) */
#define CV_struct_define_TT_Motor_1m_per_min_tag 1
#define CV_struct_define_TT_Motor_one_degree_tag 2
#define CV_struct_define_strain_gauge_k_tag 3
#define CV_struct_define_strain_gauge_b_tag 4
#define CV_struct_define_pressure_Max_tag 5
#define CV_struct_define_pulse_Per_Circle_tag 6
#define CV_struct_define_wheel_Reduction_Ratio_tag 7
#define CV_struct_define_wheel_Diameter_m_tag 8
#define CV_struct_define_PID_high_tag 9
#define CV_struct_define_PID_mid_tag 10
#define CV_struct_define_PID_low_tag 11
#define CV_struct_define_strain_gauge_k_tag 1
#define CV_struct_define_strain_gauge_b_tag 2
#define CV_struct_define_pressure_Max_tag 3
#define CV_struct_define_angle_offset_tag 4
/* Struct field encoding specification for nanopb */
#define CV_struct_define_FIELDLIST(X, a) \
X(a, STATIC, SINGULAR, FLOAT, TT_Motor_1m_per_min, 1) \
X(a, STATIC, SINGULAR, FLOAT, TT_Motor_one_degree, 2) \
X(a, STATIC, SINGULAR, FLOAT, strain_gauge_k, 3) \
X(a, STATIC, SINGULAR, FLOAT, strain_gauge_b, 4) \
X(a, STATIC, SINGULAR, FLOAT, pressure_Max, 5) \
X(a, STATIC, SINGULAR, INT32, pulse_Per_Circle, 6) \
X(a, STATIC, SINGULAR, INT32, wheel_Reduction_Ratio, 7) \
X(a, STATIC, SINGULAR, DOUBLE, wheel_Diameter_m, 8) \
X(a, STATIC, OPTIONAL, MESSAGE, PID_high, 9) \
X(a, STATIC, OPTIONAL, MESSAGE, PID_mid, 10) \
X(a, STATIC, OPTIONAL, MESSAGE, PID_low, 11)
X(a, STATIC, SINGULAR, FLOAT, strain_gauge_k, 1) \
X(a, STATIC, SINGULAR, FLOAT, strain_gauge_b, 2) \
X(a, STATIC, SINGULAR, FLOAT, pressure_Max, 3) \
X(a, STATIC, SINGULAR, FLOAT, angle_offset, 4)
#define CV_struct_define_CALLBACK NULL
#define CV_struct_define_DEFAULT NULL
#define CV_struct_define_PID_high_MSGTYPE PID_Parameters
#define CV_struct_define_PID_mid_MSGTYPE PID_Parameters
#define CV_struct_define_PID_low_MSGTYPE PID_Parameters
extern const pb_msgdesc_t CV_struct_define_msg;
@ -78,7 +51,7 @@ extern const pb_msgdesc_t CV_struct_define_msg;
/* Maximum encoded size of messages (where known) */
#define BSP_CV_PB_H_MAX_SIZE CV_struct_define_size
#define CV_struct_define_size 176
#define CV_struct_define_size 20
#ifdef __cplusplus
} /* extern "C" */

2
Core/BASE/Protobuf/PSource/bsp_GV.pb.h

@ -167,7 +167,7 @@ extern const pb_msgdesc_t GV_struct_define_msg;
/* Maximum encoded size of messages (where known) */
#define BSP_GV_PB_H_MAX_SIZE GV_struct_define_size
#define GV_struct_define_size 2073
#define GV_struct_define_size 2051
#ifdef __cplusplus
} /* extern "C" */

12
Core/BASE/Protobuf/PSource/bsp_IV.pb.h

@ -77,6 +77,8 @@ typedef struct _IV_struct_define {
int32_t robot_set_speed;
/* 记录是否正在进行自动行进 */
int32_t auto_mode_status;
/* 确诊机器人出错的原因 */
int32_t reason_of_robot_error;
} IV_struct_define;
@ -85,8 +87,8 @@ extern "C" {
#endif
/* Initializer values for message structs */
#define IV_struct_define_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define IV_struct_define_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define IV_struct_define_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define IV_struct_define_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
/* Field tags (for use in manual encoding/decoding) */
#define IV_struct_define_LeftCompensation_tag 1
@ -111,6 +113,7 @@ extern "C" {
#define IV_struct_define_robot_start_tag 20
#define IV_struct_define_robot_set_speed_tag 21
#define IV_struct_define_auto_mode_status_tag 22
#define IV_struct_define_reason_of_robot_error_tag 23
/* Struct field encoding specification for nanopb */
#define IV_struct_define_FIELDLIST(X, a) \
@ -135,7 +138,8 @@ X(a, STATIC, SINGULAR, INT32, left_angle, 18) \
X(a, STATIC, SINGULAR, INT32, right_angle, 19) \
X(a, STATIC, SINGULAR, INT32, robot_start, 20) \
X(a, STATIC, SINGULAR, INT32, robot_set_speed, 21) \
X(a, STATIC, SINGULAR, INT32, auto_mode_status, 22)
X(a, STATIC, SINGULAR, INT32, auto_mode_status, 22) \
X(a, STATIC, SINGULAR, INT32, reason_of_robot_error, 23)
#define IV_struct_define_CALLBACK NULL
#define IV_struct_define_DEFAULT NULL
@ -146,7 +150,7 @@ extern const pb_msgdesc_t IV_struct_define_msg;
/* Maximum encoded size of messages (where known) */
#define BSP_IV_PB_H_MAX_SIZE IV_struct_define_size
#define IV_struct_define_size 249
#define IV_struct_define_size 261
#ifdef __cplusplus
} /* extern "C" */

14
Core/BASE/Protobuf/PSource/bsp_strain_gauge.pb.h

@ -18,8 +18,6 @@ typedef struct _Strain_Gauge_Struct {
int32_t HX711_D; /* 寄存器3 HX711_D */
int32_t Save; /* 寄存器9: 设置为55时,把当前寄存器输入存入flash,写入成功自动变成1 */
int32_t RawPressure; /* 寄存器1: 输出的传感器原始数据 */
int32_t Read_K;
int32_t Read_D;
} Strain_Gauge_Struct;
@ -28,8 +26,8 @@ extern "C" {
#endif
/* Initializer values for message structs */
#define Strain_Gauge_Struct_init_default {0, 0, 0, 0, 0, 0, 0, 0}
#define Strain_Gauge_Struct_init_zero {0, 0, 0, 0, 0, 0, 0, 0}
#define Strain_Gauge_Struct_init_default {0, 0, 0, 0, 0, 0}
#define Strain_Gauge_Struct_init_zero {0, 0, 0, 0, 0, 0}
/* Field tags (for use in manual encoding/decoding) */
#define Strain_Gauge_Struct_MotorControl_tag 1
@ -38,8 +36,6 @@ extern "C" {
#define Strain_Gauge_Struct_HX711_D_tag 4
#define Strain_Gauge_Struct_Save_tag 5
#define Strain_Gauge_Struct_RawPressure_tag 6
#define Strain_Gauge_Struct_Read_K_tag 7
#define Strain_Gauge_Struct_Read_D_tag 8
/* Struct field encoding specification for nanopb */
#define Strain_Gauge_Struct_FIELDLIST(X, a) \
@ -48,9 +44,7 @@ X(a, STATIC, SINGULAR, INT32, Pressure, 2) \
X(a, STATIC, SINGULAR, INT32, HX711_K, 3) \
X(a, STATIC, SINGULAR, INT32, HX711_D, 4) \
X(a, STATIC, SINGULAR, INT32, Save, 5) \
X(a, STATIC, SINGULAR, INT32, RawPressure, 6) \
X(a, STATIC, SINGULAR, INT32, Read_K, 7) \
X(a, STATIC, SINGULAR, INT32, Read_D, 8)
X(a, STATIC, SINGULAR, INT32, RawPressure, 6)
#define Strain_Gauge_Struct_CALLBACK NULL
#define Strain_Gauge_Struct_DEFAULT NULL
@ -61,7 +55,7 @@ extern const pb_msgdesc_t Strain_Gauge_Struct_msg;
/* Maximum encoded size of messages (where known) */
#define BSP_STRAIN_GAUGE_PB_H_MAX_SIZE Strain_Gauge_Struct_size
#define Strain_Gauge_Struct_size 88
#define Strain_Gauge_Struct_size 66
#ifdef __cplusplus
} /* extern "C" */

15
Core/BASE/Protobuf/Proto/bsp_CV.proto

@ -6,17 +6,10 @@ import "bsp_PID.proto";
message CV_struct_define{
//
float TT_Motor_1m_per_min=1; //1m/min对应要发的参考数值
float TT_Motor_one_degree=2; //1°
float strain_gauge_k=3; //k值
float strain_gauge_b=4; //b值
float pressure_Max=5; //
int32 pulse_Per_Circle=6; //
int32 wheel_Reduction_Ratio=7; //
double wheel_Diameter_m=8; // m
PID_Parameters PID_high=9;
PID_Parameters PID_mid=10;
PID_Parameters PID_low=11;
float strain_gauge_k=1; //k值
float strain_gauge_b=2; //b值
float pressure_Max=3; //
float angle_offset=4; //
}

3
Core/BASE/Protobuf/Proto/bsp_IV.proto

@ -93,4 +93,7 @@ message IV_struct_define
//
int32 auto_mode_status=22;
//
int32 reason_of_robot_error=23;
};

2
Core/BASE/Protobuf/Proto/bsp_strain_gauge.proto

@ -8,8 +8,6 @@ message Strain_Gauge_Struct
int32 HX711_D=4; //3 HX711_D
int32 Save=5;//9 55flash1
int32 RawPressure=6;// 1
int32 Read_K=7;
int32 Read_D=8;
};

16
Core/BASE/Protobuf/Proto/bsp_strain_gauge.txt

@ -0,0 +1,16 @@
syntax = "proto3";
//从机地址0x32;
message Strain_Gauge_Struct
{
int32 MotorControl=1;//寄存器0: 电机控制,=0 停止,=1 前进,=2 后退
int32 Pressure=2;// 寄存器1: 输出的传感器最终数据
int32 HX711_K=3; //寄存器2 HX711_K
int32 HX711_D=4; //寄存器3 HX711_D
int32 Save=5;//寄存器9: 设置为55时,把当前寄存器输入存入flash,写入成功自动变成1
int32 RawPressure=6;// 寄存器1: 输出的传感器原始数据
int32 Read_K=7;
int32 Read_D=8;
};
//protoc --nanopb_out=. *.proto

14
Core/BASE/Src/BSP/bsp_MB_host.c

@ -301,17 +301,17 @@ void MB_WriteNumHoldingReg(uint8_t *Tx_Buf, uint8_t *TxCount_t, uint8_t _addr,
uint16_t i;
uint16_t TxCount = 0;
uint16_t crc = 0;
Tx_Buf[TxCount++] = _addr; /* 从站地址 */
Tx_Buf[TxCount++] = _addr; /* 从站地址 0x34*/
Tx_Buf[TxCount++] = 0x10; /* 功能码 */
Tx_Buf[TxCount++] = _reg >> 8; /* 寄存器地址 高字节 */
Tx_Buf[TxCount++] = _reg; /* 寄存器地址 低字节 */
Tx_Buf[TxCount++] = _num >> 8; /* 寄存器(16bits)个数 高字节 */
Tx_Buf[TxCount++] = _num; /* 低字节 */
Tx_Buf[TxCount++] = _num << 1; /* 数据个数 */
Tx_Buf[TxCount++] = _reg >> 8; /* 寄存器地址 高字节 0*/
Tx_Buf[TxCount++] = _reg; /* 寄存器地址 低字节 0*/
Tx_Buf[TxCount++] = _num >> 8; /* 寄存器(16bits)个数 高字节 0*/
Tx_Buf[TxCount++] = _num; /* 低字节 8*/
Tx_Buf[TxCount++] = _num << 1; /* 数据个数 0x10*/
for (i = 0; i < 2 * _num; i++)
{
Tx_Buf[TxCount++] = _databuf[i]; /* 后面的数据长度 */
Tx_Buf[TxCount++] = _databuf[i]; /* 后面的数据长度 */ //01 00 00 00 00 00 00 00
}
crc = MB_CRC16(Tx_Buf, TxCount);
Tx_Buf[TxCount++] = crc; /* crc 低字节 */

28
Core/BASE/Src/MSP/msp_PID.c

@ -167,33 +167,7 @@ void GF_MSP_PID_Now_Der_adj_Com_Weld(double Current_Angle, double Desire_Angle_I
RightSpeed_Con_1 = (Auto_Speed - Kp1 * Incre_Speed[0]);
LeftSpeed_Con_2 = Auto_Speed + Kp1 * Incre_Speed[0];
RightSpeed_Con_2 = Auto_Speed - Kp1 * Incre_Speed[0];
// if (Detal_Angle >= deltaAngle1)
// {
//
////小角度时,两前轮调整
// }
// else if (Detal_Angle > deltaAngle1 && Detal_Angle <= deltaAngle2)
// {
// LeftSpeed_Con_1 = (Auto_Speed + Kp2 * Incre_Speed[0]);
// RightSpeed_Con_1 = (Auto_Speed - Kp2 * Incre_Speed[0]);
// LeftSpeed_Con_2 = Auto_Speed + Kp2 * Incre_Speed[0];
// RightSpeed_Con_2 = Auto_Speed - Kp2 * Incre_Speed[0];
////中小角度时,两前轮差速,两后轮跟踪调整
// }
// else if (Detal_Angle > deltaAngle2 && Detal_Angle <= deltaAngle3)
// {
// LeftSpeed_Con_1 = (Auto_Speed + Kp3 * Incre_Speed[0]);
// RightSpeed_Con_1 = (Auto_Speed - Kp3 * Incre_Speed[0]);
// LeftSpeed_Con_2 = Auto_Speed + Kp3 * Incre_Speed[0];
// RightSpeed_Con_2 = Auto_Speed - Kp3 * Incre_Speed[0];
// }
// else
// {
// LeftSpeed_Con_1 = (Auto_Speed + Kp4 * Incre_Speed[0]);
// RightSpeed_Con_1 = (Auto_Speed - Kp4 * Incre_Speed[0]);
// LeftSpeed_Con_2 = Auto_Speed + Kp4 * Incre_Speed[0];
// RightSpeed_Con_2 = Auto_Speed - Kp4 * Incre_Speed[0];
// }
double Jud_value = fabs(LeftSpeed_Con_1) - fabs(RightSpeed_Con_1);
double factor = 0;

4
Core/BASE/Src/MSP/msp_ground_management.c

@ -112,8 +112,8 @@ void ground_management_inquiry()
}
void decode_ground_management(uint8_t *buffer, uint16_t length)
{
// uint8_t data1[length];
// memcpy(data1, buffer, length);
uint8_t data1[length];
memcpy(data1, buffer, length);
int decoded_result = MB_Decode_HoldingRegs(buffer, length, g_m_read_count,
&decoded_ground_management_holdingReg_value[0]);
if (decoded_result == 1)

0
Core/BASE/Src/MSP/msp_strain_gauge.c → Core/BASE/Src/MSP/msp_strain_gauge.txt

176
Core/BASE/Src/MSP/msp_strain_gauge_new.c

@ -0,0 +1,176 @@
/*
* msp_strain_gauge.c
*
* Created on: 20251125
* Author: akeguo
*/
#include "msp_strain_gauge.h"
//应变片采集模块
Strain_Gauge_Struct *strainGaugeValue;
uint8_t strain_gauge_slave_id = 0x32; //默认为1
struct UARTHandler *strain_gauge_handler;
uint16_t to_send_bytes[50];
DispacherController *strain_gauge_dispacherController;
void strain_gauge_loop();
void decode_strain_gauge_01(uint8_t *buffer, uint16_t length);
void decode_strain_gauge_09(uint8_t *buffer, uint16_t length);
void decode_strain_gauge_56(uint8_t *buffer, uint16_t length);
void strain_gauge_intialize(struct UARTHandler *Handler)
{
//strain_gauge_slave_id=slave_id;
strain_gauge_handler = Handler;
strain_gauge_handler->Wait_time = 10; //等待10ms 最低不要低于4;
strain_gauge_dispacherController = Handler->dispacherController;
strain_gauge_dispacherController->Dispacher_Enable = 1;
//不周期性发送
strain_gauge_dispacherController->Add_Dispatcher_List(
strain_gauge_dispacherController, strain_gauge_loop); //Dispatcher_List_Add_t bsp com helper.c
HardWareErrorController->Add_PCOMHardWare(HardWareErrorController,
"strain_gauge", 0, ComError_Strain_Gauge);
LOG("strain_gauge_intialize");
}
void strain_gauge_intialize_with_slaveid(struct UARTHandler *Handler,
int slave_id)
{
strain_gauge_intialize(Handler);
strain_gauge_slave_id = slave_id;
}
int SAVE_Register9=0;
int SAVE_Register23=0;
void strain_gauge_loop()
{
// 必须要初始化 strainGaugeValue
//读取力
MB_ReadHoldingReg(&strain_gauge_handler->Tx_Buf,
&strain_gauge_handler->TxCount, strain_gauge_slave_id, 1, 1); //03 command ; read 3 registers 从1 开始 读取1个
strain_gauge_handler->AddSendList(strain_gauge_handler,
strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount,
OneLineWaitTime, decode_strain_gauge_01);
//推杆控制
MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf,
&strain_gauge_handler->TxCount, strain_gauge_slave_id, 0,
strainGaugeValue->MotorControl); //strainGaugeValue->MotorControl 电机控制,=0 停止,=1 前进,=2 后退
strain_gauge_handler->AddSendList(strain_gauge_handler,
strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount,
OneLineWaitTime,
NULL);
/*写寄存器2 3 KD**/
if (SAVE_Register23 == 1)
{
/*写寄存器2 K**/
MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf,
&strain_gauge_handler->TxCount, strain_gauge_slave_id, 2,
(uint16_t) strainGaugeValue->HX711_K);
strain_gauge_handler->AddSendList(strain_gauge_handler,
strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount,
OneLineWaitTime,
NULL);
/*写寄存器3 and 4 D**/
memcpy(&to_send_bytes[3],&strainGaugeValue->HX711_D,4);
to_send_bytes[3]=SWAP_ENDIAN_16(to_send_bytes[3]);
to_send_bytes[4]=SWAP_ENDIAN_16(to_send_bytes[4]);
MB_WriteNumHoldingReg(&strain_gauge_handler->Tx_Buf,
&strain_gauge_handler->TxCount, strain_gauge_slave_id, 3, 2,
&to_send_bytes[3]);
strain_gauge_handler->AddSendList(strain_gauge_handler,
strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount,
OneLineWaitTime,
NULL);
// read 5 -6 holidng registers
MB_ReadHoldingReg(&strain_gauge_handler->Tx_Buf,
&strain_gauge_handler->TxCount, strain_gauge_slave_id, 5, 2); //03 command ; read 2 registers 从1 开始 读取1个
strain_gauge_handler->AddSendList(strain_gauge_handler,
strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount,
OneLineWaitTime, decode_strain_gauge_56);
SAVE_Register23 = 0;
}
/*写寄存器9 设置为55保存KD**/
if (SAVE_Register9 == 1)
{
strainGaugeValue->Save=55;
MB_WriteHoldingReg(&strain_gauge_handler->Tx_Buf,
&strain_gauge_handler->TxCount, strain_gauge_slave_id, 9,
strainGaugeValue->Save);
strain_gauge_handler->AddSendList(strain_gauge_handler,
strain_gauge_handler->Tx_Buf, strain_gauge_handler->TxCount,
OneLineWaitTime,
NULL);
SAVE_Register9 = 0;
}
}
int16_t decoded_strain_gauge_holdingReg_value[20];
//读取 00-02的寄存器
void decode_strain_gauge_01(uint8_t *buffer, uint16_t length)
{
// uint8_t data1[length];
// memcpy(data1, buffer, length);
int decoded_result = MB_Decode_HoldingRegs(buffer, length, 1,
&decoded_strain_gauge_holdingReg_value[1]);
if (decoded_result == 1)
{
strainGaugeValue->Pressure = (int16_t)decoded_strain_gauge_holdingReg_value[1];
HardWareErrorController->Set_PCOMHardWare(HardWareErrorController,
"strain_gauge", 1);
// LOG("Battery_sensor succeeded and the force is %d", *CMCU06_ForceValue);
}
else
{
LOGFF(DL_ERROR, "strain_gauge_decoding failed");
}
}
/*origin value*/
void decode_strain_gauge_56(uint8_t *buffer, uint16_t length)
{
int decoded_result = MB_Decode_HoldingRegs(buffer, length, 2,
&decoded_strain_gauge_holdingReg_value[5]);
if (decoded_result == 1)
{
// decoded_strain_gauge_holdingReg_value[5]=SWAP_ENDIAN_16(decoded_strain_gauge_holdingReg_value[5]);
// decoded_strain_gauge_holdingReg_value[6]=SWAP_ENDIAN_16(decoded_strain_gauge_holdingReg_value[6]);
memcpy(&strainGaugeValue->RawPressure,&decoded_strain_gauge_holdingReg_value[5],4);
HardWareErrorController->Set_PCOMHardWare(HardWareErrorController,
"strain_gauge", 1);
// LOG("Battery_sensor succeeded and the force is %d", *CMCU06_ForceValue);
}
else
{
LOGFF(DL_ERROR, "strain_gauge_decoding failed");
}
}
//读取 09的寄存器
void decode_strain_gauge_09(uint8_t *buffer, uint16_t length)
{
// uint8_t data1[100];
// memcpy(data1, buffer, length);
int decoded_result = MB_Decode_HoldingRegs(buffer, length, 1,
&decoded_strain_gauge_holdingReg_value[9]);
if (decoded_result == 1)
{
strainGaugeValue->Save = decoded_strain_gauge_holdingReg_value[9];
HardWareErrorController->Set_PCOMHardWare(HardWareErrorController,
"strain_gauge", 1);
// LOG("Battery_sensor succeeded and the force is %d", *CMCU06_ForceValue);
}
else
{
LOGFF(DL_ERROR, "strain_gauge_decoding failed");
}
}

15
Core/FSM/Src/Handset_Status_Setting.c

@ -394,6 +394,12 @@ void PV_control(void)
{
GV.Robot_Move_Speed=1;
}
//摆臂速度不允许为1,若设置了1,则强制置为2
if(GV.Robot_Swing_Speed==1)
{
GV.Robot_Swing_Speed=2;
}
}
/**
@ -420,11 +426,20 @@ void IV_control(void)
IV.left_angle = left_compare_value;
IV.right_angle = right_compare_value;
IV.robot_set_speed =((float)(P_MK32->CH11_RD1+1000)*14)/2000;
//机器人运行速度不允许为0,最小为1
if(IV.robot_set_speed<=1)
{
IV.robot_set_speed=1;
}
//摆臂速度不允许为1,若设置了1,则强制置为2
if(GV.Robot_Swing_Speed==1)
{
GV.Robot_Swing_Speed=2;
}
if((P_MK32->CH5_SB!=0)||(P_MK32->CH7_SD!=0))
{
IV.auto_mode_status=1;

137
Core/FSM/Src/fsm_state_control.c

@ -294,7 +294,8 @@ void GF_Dispatch(void)
if(Get_BIT(SystemErrorCode, ComError_Mk32_SBus) == CONNECTED
&&(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID1_LeftMotor) == CONNECTED)
&&(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID2_RightMotor) == CONNECTED)
&&(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID3_SwingMotor) == CONNECTED))
&&(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID3_SwingMotor) == CONNECTED)
&&((Get_BIT(SystemErrorCode, ComError_MK32_Serial) == CONNECTED)))
{
start_flag=1;
//SystemErrorCode = 0;
@ -307,6 +308,10 @@ void GF_Dispatch(void)
{
error_detcet=AbnormalDetect();
IV.robot_start=2; //表示机器人成功启动
if(IV.reason_of_robot_error==0) //只获取最初的错误原因
{
IV.reason_of_robot_error =error_detcet;
}
}
@ -320,8 +325,8 @@ void GF_Dispatch(void)
// 获取当前模式和按键
InputEvent curr_key = RemoteControl_GetKeyIndex(prev_mode);
// 仅按键变化时更新动作
if (curr_key != prev_key)
// 仅按键变化和机器人成功启动后时更新动作
if (curr_key != prev_key&&(start_flag==1))
{
robot_start_flag=1;
PV_control();
@ -370,62 +375,86 @@ int cnt=0;
int AbnormalDetect(void)
{
/* SBUS 出错 */
if (Get_BIT(SystemErrorCode, ComError_Mk32_SBus) == DISCONNECTED
||(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID1_LeftMotor) == DISCONNECTED)
||(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID2_RightMotor) == DISCONNECTED)
||(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID3_SwingMotor) == DISCONNECTED)
||(Get_BIT(SystemErrorCode, ComError_Ground_Management) == DISCONNECTED))
{
cnt++;
if(cnt>250)
{
//触发软急停
GV.GroundManagementValue.MaualControlPower=1;
GV.GroundManagementValue.MaualPowerState=0;
cnt=0;
return 1;
}
}
/* 串口出错 */
if (Get_BIT(SystemErrorCode, ComError_MK32_Serial) == DISCONNECTED)
{
GV.GroundManagementValue.MaualControlPower=1;
GV.GroundManagementValue.MaualPowerState=0;
return 2;
}
// ====================== 第一步:先假设正常 ======================
int is_error = 0;
/* 陀螺仪无信号 */
if (Get_BIT(SystemErrorCode, ComError_TL720D) == DISCONNECTED)
{
return 4;
}
/* 遥控器关机或失联 */
if (P_MK32->IsOnline == 0)
{
GV.GroundManagementValue.MaualControlPower=1;
GV.GroundManagementValue.MaualPowerState=0;
Is_All_Button_Reset = 0;
return 6;
}
/* SBUS出错 */
if (Get_BIT(SystemErrorCode, ComError_Mk32_SBus) == DISCONNECTED)
{
is_error = 1;
}
/* 串口出错 */
else if (Get_BIT(SystemErrorCode, ComError_MK32_Serial) == DISCONNECTED)
{
is_error = 2;
}
/* 地面端出错 */
else if(Get_BIT(SystemErrorCode, ComError_Ground_Management) == DISCONNECTED)
{
is_error = 3;
}
/* 遥控器关机或失联 */
else if (P_MK32->IsOnline == 0)
{
is_error = 6;
}
/* 陀螺仪无信号 */
else if (Get_BIT(SystemErrorCode, ComError_TL720D) == DISCONNECTED)
{
is_error = 4;
}
/* 按钮未复位 */
else if (Get_BIT(SystemErrorCode, ComError_MK32_InitialState) != Has_Reset)
{
is_error = 7;
}
/* 电机失联 */
else if(Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID1_LeftMotor) == DISCONNECTED
|| Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID2_RightMotor) == DISCONNECTED
|| Get_BIT(SystemErrorCode, ComError_ZQ_CAN_ID3_SwingMotor) == DISCONNECTED)
{
is_error = 8;
}
else
{
// 完全正常 → 立刻清0计数
cnt = 0;
return 0;
}
// ====================== 第二步:统一计数 ======================
cnt++;
/* 按钮未复位 */
if (Get_BIT(SystemErrorCode, ComError_MK32_InitialState) != Has_Reset)
{
return 3;
}
// ====================== 第三步:需要延迟触发的错误 ======================
if (is_error == 1 || is_error == 2 || is_error == 3 ||is_error == 6||is_error == 8)
{
if (cnt > 1000)
{
// 触发软急停
GV.GroundManagementValue.MaualControlPower = 1;
GV.GroundManagementValue.MaualPowerState = 0;
cnt = 0;
}
if (is_error == 1) return 1;
if (is_error == 2) return 2;
if (is_error == 3) return 3;
if (is_error == 6) return 6;
if (is_error == 8) return 8;
}
// ====================== 第四步:不需要延迟,直接触发 ======================
else if (is_error == 3)
{
return 3;
}
else if (is_error == 4)
{
return 4;
}
return 0;
// 正在计数,还没到触发条件
return 0;
}

131
Core/FSM/Src/robot_move_actions.c

@ -52,7 +52,16 @@ enum single_lane_auto_state {
STATE_COUNT /* 状态总数 */
};
/**
*
*/
enum manual_single_lane_auto_state {
MANUAL_STATE_WORK_WAY_OR_DIRECT_MOVE, /* 工作模式选择 */
MANUAL_STATE_FIGHT_ALTERNATELY, /* 交替后退 */
MANUAL_STATE_FIGHT_RETREATING, /* 连续后退 */
MANUAL_STATE_HALT, /* 停机状态 */
MANUAL_STATE_COUNT /* 状态总数 */
};
/**
* 退
*/
@ -98,6 +107,7 @@ enum weld_auto_state {
*/
typedef enum {
FSM_init_state = 0, // 默认初始化的值(占位,不使用)
FSM_MANUAL_AUTO_Flag, // “无”单道自动
FSM_HORIZONTAL_AUTO_Flag, // 水平单道自动
FSM_HORIZONTAL_FORWARD_Flag, // 水平前进(简化版)
FSM_VERTICAL_FORWARD_Flag, // 垂直前进
@ -154,6 +164,7 @@ static void handleAttitudeJudge_vertical(void);
static void handleAttitudeAdjustHorizontal(void);
static void handleAttitudeAdjustVertical(void);
static void handleAttitudeAdjustChangeRoad(void);
static void handleWorkWay_manual(void);
static void handleWorkWay(void);
void horizontal_work(void);
void Move_Horizontal_Auto_Sub_Func(void);
@ -169,6 +180,7 @@ static void handleLaneChangeCalcRetreatTime(void);
static void handleLaneChangeContinuousRetreat(void);
/* 打退连续函数 */
void Fight_Countinus_Function_Manual();
void Fight_Countinus_Function_Horizontal();
void Fight_Countinus_Function_Vertical();
void Move_Horizontal_Vertical_Task_Backwards_Do_Backward(void);
@ -178,11 +190,13 @@ void Update_Angle_compensation_hor(void);
void Update_Angle_compensation_ver(void);
void Auto_Forward_Function_Horizontal_group(void);
void Auto_Forward_Function_Vertical_group(void);
void Fight_Alternately_Function_Horizontal(void);
/* 打退交替函数 */
void Fight_Alternately_Function_Manual(void);
void Fight_Alternately_Function_Horizontal(void);
void alternately_stop_func(void);
void alternately_back_func(void);
void alternately_back_func_manual(void);
void alternately_back_func_vertical(void);
/* 辅助函数 */
@ -204,6 +218,19 @@ int factor_1= 1;
int factor_2= -1;
/*===========================6.函数指针表 ===========================*/
/**
*
*/
static const void (*const manual_single_lane_auto_operation[])(void) = {
[MANUAL_STATE_WORK_WAY_OR_DIRECT_MOVE] = handleWorkWay_manual,
[MANUAL_STATE_FIGHT_ALTERNATELY] = Fight_Alternately_Function_Manual, /* 打退交替 */
[MANUAL_STATE_FIGHT_RETREATING] = Fight_Countinus_Function_Manual, /*打退连续 */
[MANUAL_STATE_HALT] = handleHalt,
};
/**
*
* STATE_FIGHT_ALTERNATELY STATE_FIGHT_RETREATING NULL
@ -224,6 +251,13 @@ static const void (*const horizontal_single_lane_auto_operation[])(void) = {
* 退
* STATE_FIGHT_ALTERNATELY STATE_FIGHT_RETREATING NULL
*/
static const void (*const alternately_work_manual[])(void) = {
[STATE_ROBOT_STOP] = alternately_stop_func,
[STATE_ROBOT_BACK] = alternately_back_func_manual,
[STATE_HALT] = handleHalt,
};
static const void (*const alternately_work_horizontal[])(void) = {
[STATE_ROBOT_STOP] = alternately_stop_func,
[STATE_ROBOT_BACK] = alternately_back_func,
@ -359,6 +393,7 @@ void Robot_Stop(void)
check_and_reset_fsm(FSM_init_state);
swing_currentState = 0;
alternately_times =0;
alternately_times_total=0;
alternately_flag=0;
GV.auto_working=0;
@ -452,9 +487,9 @@ static void handleAttitudeJudge_vertical(void)
{
float robotRoll = (float)GV.TL720DParameters.RF_Angle_Roll / 100.0f;
if (robotRoll > -90.0f && robotRoll <= 90.0f) {
GV.Robot_Angle_Desire = GV.Vertical_Adjust;
}
// if (robotRoll > -90.0f && robotRoll <= 90.0f) {
GV.Robot_Angle_Desire = GV.Vertical_Adjust;
// }
// else
// {
// GV.Robot_Angle_Desire = 180.0f + GV.Vertical_Adjust;
@ -462,7 +497,7 @@ static void handleAttitudeJudge_vertical(void)
// GV.Robot_Angle_Desire -= 360.0f;
// }
// }
s_fsmState[s_activeFsm] = STATE_WORK_WAY_OR_DIRECT_MOVE;//STATE_ATTITUDE_ADJUST;
s_fsmState[s_activeFsm] = STATE_ATTITUDE_ADJUST;
}
@ -490,17 +525,40 @@ void alternately_stop_func(void)
//打退交替状态下机器人后退状态
void alternately_back_func_manual(void)
{
GV.Robot_Desired_Speed=-1;//-GV.Robot_Move_Speed;
alternately_times_total=-300*GV.robot_back_distance/GV.Robot_Desired_Speed; //计算出后退总时间
if(alternately_times<alternately_times_total)
{
GV.Robot_Desired_Speed=-1;
GV.Left_Speed_M_min=GV.Robot_Desired_Speed;
GV.Right_Speed_M_min=-GV.Robot_Desired_Speed;
alternately_times++;
}
else
{
GV.Robot_Desired_Speed=0;
alternately_times=0;
alternately_flag=STATE_ROBOT_STOP;
}
}
void alternately_back_func(void)
{
GV.Robot_Desired_Speed=-1;//-GV.Robot_Move_Speed;
alternately_times_total=-300*GV.robot_back_distance/GV.Robot_Desired_Speed; //计算出后退总时间
if(alternately_times<=alternately_times_total)
if(alternately_times<alternately_times_total)
{
GV.Robot_Desired_Speed=-1;
auto_drive_pid_horizontal();
alternately_times++;
}
else
{
GV.Robot_Desired_Speed=0;
alternately_times=0;
alternately_flag=STATE_ROBOT_STOP;
}
@ -511,18 +569,31 @@ void alternately_back_func_vertical(void)
{
GV.Robot_Desired_Speed=-1;//-GV.Robot_Move_Speed;
alternately_times_total=-300*GV.robot_back_distance/GV.Robot_Desired_Speed; //计算出后退总时间
if(alternately_times<=alternately_times_total)
if(alternately_times<alternately_times_total)
{
GV.Robot_Desired_Speed=-1;
auto_drive_pid_vertical();
alternately_times++;
}
else
{
GV.Robot_Desired_Speed=0;
alternately_times=0;
alternately_flag=STATE_ROBOT_STOP;
}
}
static void handleWorkWay_manual(void)
{
int mode = GV.Robot_backMode;
if (mode == 1) {
s_fsmState[s_activeFsm]= MANUAL_STATE_FIGHT_ALTERNATELY;
} else if (mode == 2) {
s_fsmState[s_activeFsm]= MANUAL_STATE_FIGHT_RETREATING;
}
/* 其他模式保持当前状态?目前没有 else,可能默认留在该状态 */
//s_fsmState[s_activeFsm]= STATE_FIGHT_RETREATING;
}
static void handleWorkWay(void)
@ -726,6 +797,23 @@ void Auto_Forward_Function_Vertical_group(void)
/*-----------------------------------------------------------------
*退
*-----------------------------------------------------------------*/
void Fight_Alternately_Function_Manual(void)
{
swing_work();
if (alternately_flag >= 0 && alternately_flag < STATE_COUNT) {
if (alternately_work_manual[alternately_flag] != NULL) {
alternately_work_manual[alternately_flag]();
} else {
/* 遇到未实现的状态,停机处理 */
handleHalt();
}
} else {
handleHalt();
}
}
void Fight_Alternately_Function_Horizontal(void)
{
swing_work();
@ -831,7 +919,8 @@ void get_swing_mode(void)
{
if(GV.symmetricalOrNot==1)
{
if(GV.PV.Robot_Swing_Range_Angle!=offset_angle && GV.SwingMotor.Real_Position!=0)
//if(GV.PV.Robot_Swing_Range_Angle!=offset_angle && GV.SwingMotor.Real_Position!=0)
if(GV.SwingMotor.Real_Position!=0)
{
offset_angle=GV.PV.Robot_Swing_Range_Angle;
center_angle=-((float)GV.SwingMotor.Real_Position-swing_center_pos)/TT_One_Deg_Count2;
@ -952,18 +1041,16 @@ static void auto_drive_pid_weld(void)
}
float speed_w[2];
float PID_factor=1;
static void auto_drive_pid_vertical(void)
{
float robotRoll = (float)GV.TL720DParameters.RF_Angle_Roll / 100.0f;
float speeds[2];
float Robot_Desired_Speed_w=GV.Robot_Desired_Speed*0.1;
TwoWheel_AngleControl(robotRoll, GV.Robot_Angle_Desire, Robot_Desired_Speed_w,PID_factor, speeds);
TwoWheel_AngleControl(robotRoll, GV.Robot_Angle_Desire, GV.Robot_Desired_Speed,PID_factor, speeds);
speed_w[0]=speeds[0];
speed_w[1]=speeds[1];
GV.Left_Speed_M_min = factor_1*speeds[0];
GV.Right_Speed_M_min = factor_2*speeds[1]; /* 根据电机方向可能需要调整符号 */
@ -996,7 +1083,21 @@ static void handleHalt(void)
/*=========================== 8.对外接口函数(需外部调用) ===========================*/
void Move_Manual_Auto_Sub_Func(void)
{
Fight_Countinus_Function_Manual();
s_activeFsm = FSM_MANUAL_AUTO_Flag;
check_and_reset_fsm(FSM_MANUAL_AUTO_Flag);
int state = s_fsmState[FSM_MANUAL_AUTO_Flag];
if (state >= 0 && state < STATE_COUNT) {
if (manual_single_lane_auto_operation[state] != NULL) {
manual_single_lane_auto_operation[state]();
} else {
/* 遇到未实现的状态,停机处理 */
handleHalt();
}
} else {
handleHalt();
}
//Fight_Countinus_Function_Manual();
}

2
Core/FSM/Src/swing_action.c

@ -19,7 +19,7 @@ float Swing_Speed_Deg_Sencond=201.7;//HJ32-121
//int offset_angle;
//int center_position; //中间位置-944334 -1354574
int limit_record=0;
float left_compare_value=30;
float left_compare_value=-30;
float right_compare_value=30;
float left_compare_updata;
float right_compare_updata;

19
Core/Src/main.c

@ -113,8 +113,7 @@ int main(void)
/* USER CODE END 1 */
/* MPU Configuration--------------------------------------------------------*/
MPU_Config();
MPU_Config();
/* Enable I-Cache---------------------------------------------------------*/
SCB_EnableICache();
@ -128,12 +127,12 @@ int main(void)
HAL_Init();
/* USER CODE BEGIN Init */
// 强制 PH0 内部下拉,消除干扰,防止推杆导致单片机死�??
// 强制 PH0 内部下拉,消除干扰,防止推杆导致单片机死�????
// __HAL_RCC_GPIOH_CLK_ENABLE();
// GPIO_InitTypeDef gpio_conf = {0};
// gpio_conf.Pin = GPIO_PIN_0;
// gpio_conf.Mode = GPIO_MODE_INPUT;
// gpio_conf.Pull = GPIO_PULLDOWN; // 关键:内部下�??
// gpio_conf.Pull = GPIO_PULLDOWN; // 关键:内部下�????
// HAL_GPIO_Init(GPIOH, &gpio_conf);
/* USER CODE END Init */
@ -163,8 +162,6 @@ int main(void)
MX_LPUART1_UART_Init();
MX_ADC2_Init();
MX_LWIP_Init();
/* USER CODE BEGIN 2 */
@ -197,9 +194,9 @@ int main(void)
if (SAVE_To_CV == 1)
{
//将0号机器人的参数传入CV中
//�??0号机器人的参数传入CV�??
memcpy(&CV, &g_B03_param_table[0], sizeof(CV));
//恢复SAVE_To_CV值防止重复设
//恢复SAVE_To_CV值防止重复设�??
SAVE_To_CV = 0;
}
@ -220,7 +217,7 @@ int main(void)
// if (SAVE_To_CV == 1)
// {
// SAVE_To_CV = 0;
// //CV写入falsh�????????????????????
// //CV写入falsh�??????????????????????
// GF_BSP_EEPROM_Set_CV(CV);
// CV = GF_BSP_EEPROM_Get_CV();
// //FS_SetZero();
@ -304,9 +301,7 @@ void CV_GV_Init()
{
//Read CV
CV = GF_BSP_EEPROM_Get_CV();
CV.has_PID_high=true;
CV.has_PID_mid=true;
CV.has_PID_low=true;
SystemErrorCode = &GV.SystemErrorData.Com_Error_Code;

2
Drivers/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.c

@ -355,7 +355,7 @@ uint32_t HAL_GetTickPrio(void)
*/
HAL_StatusTypeDef HAL_SetTickFreq(HAL_TickFreqTypeDef Freq)
{
HAL_StatusTypeDef status = HAL_OK;
HAL_StatusTypeDef status = HAL_OK;
HAL_TickFreqTypeDef prevTickFreq;
assert_param(IS_TICKFREQ(Freq));

6
Swing_Rust_UDPV2.ioc

@ -722,14 +722,14 @@ ProjectManager.MainLocation=Core/Src
ProjectManager.NoMain=false
ProjectManager.PreviousToolchain=STM32CubeIDE
ProjectManager.ProjectBuild=false
ProjectManager.ProjectFileName=Swing_Rust_UDPV1.ioc
ProjectManager.ProjectName=Swing_Rust_UDPV1
ProjectManager.ProjectFileName=Swing_Rust_UDPV2.ioc
ProjectManager.ProjectName=Swing_Rust_UDPV2
ProjectManager.RegisterCallBack=
ProjectManager.StackSize=0x2000
ProjectManager.TargetToolchain=STM32CubeIDE
ProjectManager.ToolChainLocation=
ProjectManager.UnderRoot=true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_FDCAN1_Init-FDCAN1-false-HAL-true,5-MX_FDCAN2_Init-FDCAN2-false-HAL-true,6-MX_I2C4_Init-I2C4-false-HAL-true,7-MX_TIM1_Init-TIM1-false-HAL-true,8-MX_UART4_Init-UART4-false-HAL-true,9-MX_UART5_Init-UART5-false-HAL-true,10-MX_UART7_Init-UART7-false-HAL-true,11-MX_USART1_UART_Init-USART1-false-HAL-true,12-MX_USART3_UART_Init-USART3-false-HAL-true,13-MX_USART2_UART_Init-USART2-false-HAL-true,14-MX_USART6_UART_Init-USART6-false-HAL-true,15-MX_TIM8_Init-TIM8-false-HAL-true,16-MX_QUADSPI_Init-QUADSPI-false-HAL-true,17-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,18-MX_ADC2_Init-ADC2-false-HAL-true,19-MX_LWIP_Init-LWIP-false-HAL-false,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
ProjectManager.functionlistsort=1-SystemClock_Config-RCC-false-HAL-false,2-MX_GPIO_Init-GPIO-false-HAL-true,3-MX_DMA_Init-DMA-false-HAL-true,4-MX_FDCAN1_Init-FDCAN1-false-HAL-true,5-MX_FDCAN2_Init-FDCAN2-false-HAL-true,6-MX_I2C4_Init-I2C4-false-HAL-true,7-MX_TIM1_Init-TIM1-false-HAL-true,8-MX_UART4_Init-UART4-false-HAL-true,9-MX_UART5_Init-UART5-false-HAL-true,10-MX_UART7_Init-UART7-false-HAL-true,11-MX_USART1_UART_Init-USART1-false-HAL-true,12-MX_USART3_UART_Init-USART3-false-HAL-true,13-MX_USART2_UART_Init-USART2-false-HAL-true,14-MX_USART6_UART_Init-USART6-false-HAL-true,15-MX_TIM8_Init-TIM8-false-HAL-true,16-MX_QUADSPI_Init-QUADSPI-false-HAL-true,17-MX_LPUART1_UART_Init-LPUART1-false-HAL-true,18-MX_ADC2_Init-ADC2-false-HAL-true,19-MX_LWIP_Init-LWIP-false-HAL-false,20-MX_IWDG1_Init-IWDG1-false-HAL-true,0-MX_CORTEX_M7_Init-CORTEX_M7-false-HAL-true
QUADSPI.ChipSelectHighTime=QSPI_CS_HIGH_TIME_5_CYCLE
QUADSPI.ClockMode=QSPI_CLOCK_MODE_3
QUADSPI.ClockPrescaler=2-1

Loading…
Cancel
Save