HPM APP
HPMicro Application solution
libcmdtest.h File Reference
#include "hpm_gptmr_drv.h"
#include "hpm_clock_drv.h"
#include "hpm_uart_drv.h"
#include "hpm_synt_drv.h"
#include "libhpm_motor.h"

Go to the source code of this file.

Macros

#define BOARD_BLDC_TMR_MS   HPM_GPTMR2
 
#define BOARD_BLDC_TMR_CH   0
 
#define BOARD_BLDC_TMR_CMP   0
 
#define BOARD_BLDC_TMR_IRQ   IRQn_GPTMR2
 
#define BOARD_BLDC_TMR_RELOAD   (1000000U)
 
#define BOARD__BLDC_GPTMR_CLK_NAME   clock_gptmr2
 
#define MOVE_BASOLUTE_POS_R   20
 user define motor relative position ;相对运动距离,单位:r More...
 
#define MOVE_SPEED   10
 user define motor move speed ;运动速度,单位:r/s More...
 
#define MOVE_ACC   100
 user define motor move acc ;运动加速度,单位:r/s/s More...
 
#define MOVE_JERK   1000
 user define motor move jerk ;运动加加速度,单位:r/s/s/s More...
 
#define CONSTANT_SPEED_TIME_S   1
 user define motor move time with constant speed ;速度模式下,匀速运动时间,单位:s More...
 
#define CYCLE_CNT   2
 user define motor move cycle count ;位置模式下,电机轴往返运动次数 More...
 
#define DWELLTIME_MS   500
 user define motor dwell time
;位置模式下,运行相对位置后轴停止时间,单位:ms More...
 
#define ISR_TIME_S   0.01
 set isr time
;更新位置/速度序列的中断时间,与定时器中断时间保持一致,单位:s More...
 

Enumerations

enum  move_mode { CONTINOUS_RONUD_MOVE_TYPE , SIGNLE_MOVE_TYPE , MULTIPLE_MOVE_TYPE }
 

Macro Definition Documentation

◆ BOARD__BLDC_GPTMR_CLK_NAME

#define BOARD__BLDC_GPTMR_CLK_NAME   clock_gptmr2

◆ BOARD_BLDC_TMR_CH

#define BOARD_BLDC_TMR_CH   0

◆ BOARD_BLDC_TMR_CMP

#define BOARD_BLDC_TMR_CMP   0

◆ BOARD_BLDC_TMR_IRQ

#define BOARD_BLDC_TMR_IRQ   IRQn_GPTMR2

◆ BOARD_BLDC_TMR_MS

#define BOARD_BLDC_TMR_MS   HPM_GPTMR2

◆ BOARD_BLDC_TMR_RELOAD

#define BOARD_BLDC_TMR_RELOAD   (1000000U)

◆ CONSTANT_SPEED_TIME_S

#define CONSTANT_SPEED_TIME_S   1

user define motor move time with constant speed ;速度模式下,匀速运动时间,单位:s

◆ CYCLE_CNT

#define CYCLE_CNT   2

user define motor move cycle count ;位置模式下,电机轴往返运动次数

◆ DWELLTIME_MS

#define DWELLTIME_MS   500

user define motor dwell time
;位置模式下,运行相对位置后轴停止时间,单位:ms

◆ ISR_TIME_S

#define ISR_TIME_S   0.01

set isr time
;更新位置/速度序列的中断时间,与定时器中断时间保持一致,单位:s

◆ MOVE_ACC

#define MOVE_ACC   100

user define motor move acc ;运动加速度,单位:r/s/s

◆ MOVE_BASOLUTE_POS_R

#define MOVE_BASOLUTE_POS_R   20

user define motor relative position ;相对运动距离,单位:r

◆ MOVE_JERK

#define MOVE_JERK   1000

user define motor move jerk ;运动加加速度,单位:r/s/s/s

◆ MOVE_SPEED

#define MOVE_SPEED   10

user define motor move speed ;运动速度,单位:r/s

Enumeration Type Documentation

◆ move_mode

enum move_mode
Enumerator
CONTINOUS_RONUD_MOVE_TYPE 

user define motor in continous round move type ;位置模式下,电机轴以连续往返模式运动

SIGNLE_MOVE_TYPE 

user define motor in signle move type ;位置模式下,电机轴以单次往返模式运动

MULTIPLE_MOVE_TYPE 

user define motor in multiple move type ;位置模式下,电机轴以多次往返模式运动