You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.3 KiB
35 lines
1.3 KiB
#pragma once
|
|
#include "project_configs.h"
|
|
|
|
#define MAX_USR_NAME_SIZE 5
|
|
|
|
#define MOTO_POWER_EN_IO PC2
|
|
#define MOTO1_CSN_IO PB3
|
|
#define MOTO2_CSN_IO PB4
|
|
#define MOTO3_CSN_IO PB5
|
|
#define MOTO4_CSN_IO PB6
|
|
#define MOTO1_DRV_ENN_IO PD0
|
|
#define MOTO2_DRV_ENN_IO PD1
|
|
#define MOTO3_DRV_ENN_IO PD2
|
|
#define MOTO4_DRV_ENN_IO PD3
|
|
#define ID1_IO PE0
|
|
#define ID2_IO PE1
|
|
#define ID3_IO PD7
|
|
#define ID4_IO PD9
|
|
#define ID5_IO PD8
|
|
#define IO_OUT1_IO PC0
|
|
#define IO_OUT2_IO PC1
|
|
|
|
#define MOTOR_SPI_INS hspi1
|
|
/***********************************************************************************************************************
|
|
* MOTOR_CFG *
|
|
***********************************************************************************************************************/
|
|
#define MOTOR_SHAFT false
|
|
#define STEPMOTOR_IHOLD 10
|
|
#define STEPMOTOR_IRUN 20
|
|
#define STEPMOTOR_IHOLDDELAY 100
|
|
#define MOTOR_VSTART 200 // 启动速度
|
|
#define MOTOR_A1 100 // 阶段1_加速度
|
|
#define MOTOR_AMAX 300 // 阶段2_加速度
|
|
#define MOTOR_V1 500 // 阶段2_开始速度
|
|
#define MOTOR_TZEROWAIT 100 // 速度零点点切换时间
|