stepRocker servo Open Source TMCL  1.00
 All Data Structures Files Functions Variables Typedefs Enumerations Macros
stepRocker.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Project: stepRocker Mini-TMCL (for stepRocker V2.2)
3 
4  Module: stepRocker.h
5  Definitions of globally used data types and macros
6 
7  Copyright (C) 2016 TRINAMIC Motion Control GmbH & Co KG
8  Waterloohain 5
9  D - 22769 Hamburg, Germany
10  http://www.trinamic.com/
11 
12  This program is free software; you can redistribute it and/or modify it
13  freely.
14 
15  This program is distributed "as is" in the hope that it will be useful, but
16  WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17  or FITNESS FOR A PARTICULAR PURPOSE.
18 *******************************************************************************/
19 
31 typedef unsigned char UCHAR;
32 typedef unsigned short USHORT;
33 typedef unsigned int UINT;
34 
35 #define TRUE 1
36 #define FALSE 0
37 
38 #define SW_TYPE_HIGH 0x04
39 #define SW_TYPE_LOW 0x56
40 
41 #define SW_VERSION_HIGH 0x01
42 #define SW_VERSION_LOW 0x00
43 
44 #define N_O_MOTORS 1
45 #define MOTOR_NUMBER(a) (a)
46 #define WHICH_262(a) (a)
47 
48 #define DISABLE_DRIVERS() GPIOD_PSOR = BIT2
49 #define ENABLE_DRIVERS() GPIOD_PCOR = BIT2
50 
51 #define LED1_ON() GPIOA_PSOR = BIT5
52 #define LED1_OFF() GPIOA_PCOR = BIT5
53 #define LED1_TOGGLE() GPIOA_PTOR = BIT5
54 
55 #define LED2_ON() GPIOE_PSOR = BIT5
56 #define LED2_OFF() GPIOE_PCOR = BIT5
57 #define LED2_TOGGLE() GPIOE_PTOR = BIT5
58 
59 #define SPI_DEV_EEPROM 0x0001
60 #define SPI_DEV_TMC429 0x0101
61 #define SPI_DEV_TMC262 0x0102
62 
63 
65 typedef struct
66 {
74 
76 typedef struct
77 {
87 } TMotorConfig;
88 
90 typedef struct
91 {
UINT VMax
maximum positioning velocity
Definition: stepRocker.h:78
UCHAR CANReceiveID
CAN receive ID.
Definition: stepRocker.h:70
coolStep configuration data
Definition: stepRocker.h:90
UCHAR SerialHostAddress
RS485 TMCL reply address.
Definition: stepRocker.h:69
Global module settings.
Definition: stepRocker.h:65
UINT SettingDelay
delay for switching to stand-by current (*10ms)
Definition: stepRocker.h:86
UINT ThresholdSpeed
coolStep threshold speed
Definition: stepRocker.h:92
UCHAR HysteresisStart
coolStep hysteresis start
Definition: stepRocker.h:94
UCHAR CANBitrate
CAN bit rate.
Definition: stepRocker.h:72
UCHAR SlowRunCurrent
coolStep slow run current
Definition: stepRocker.h:93
UINT FreewheelingDelay
freewheeling delay time (*10ms)
Definition: stepRocker.h:85
UINT AMax
maximum acceleration
Definition: stepRocker.h:79
unsigned int UINT
32 bits unsigned
Definition: stepRocker.h:33
UCHAR SerialBitrate
RS485 baud rate (0..7, 0=9600bps)
Definition: stepRocker.h:67
UCHAR IStandby
stand-by current(0..255)
Definition: stepRocker.h:83
UINT StallVMin
minimum speed for stallGuard
Definition: stepRocker.h:84
UCHAR IRun
run current (0..255)
Definition: stepRocker.h:82
UCHAR PulseDiv
pulse divisor (TMC429)
Definition: stepRocker.h:80
UCHAR SerialModuleAddress
RS485 TMCL module address.
Definition: stepRocker.h:68
UCHAR CANSendID
CAN send ID.
Definition: stepRocker.h:71
Motor configuration data.
Definition: stepRocker.h:76
unsigned char UCHAR
8 bits unsigned
Definition: stepRocker.h:31
unsigned short USHORT
16 bits unsigned
Definition: stepRocker.h:32
UCHAR RampDiv
ramp divisor (TMC429)
Definition: stepRocker.h:81