MIT Motor FOC Control

Dependencies:   FastPWM3

Committer:
benkatz
Date:
Sun Apr 09 03:05:52 2017 +0000
Revision:
25:f5741040c4bb
Parent:
24:58c2d7571207
Child:
26:2b865c00d7e9
Set current bandwidth from serial interface

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benkatz 23:2adf23ee0305 1 /// Values stored in flash, which are modifieable by user actions ///
benkatz 23:2adf23ee0305 2
benkatz 23:2adf23ee0305 3 #ifndef USER_CONFIG_H
benkatz 23:2adf23ee0305 4 #define USER_CONFIG_H
benkatz 23:2adf23ee0305 5
benkatz 23:2adf23ee0305 6
benkatz 25:f5741040c4bb 7 #define E_OFFSET __float_reg[0] // Encoder electrical offset
benkatz 25:f5741040c4bb 8 #define M_OFFSET __float_reg[1] // Encoder mechanical offset
benkatz 25:f5741040c4bb 9 #define I_BW __float_reg[2] // Current loop bandwidth
benkatz 25:f5741040c4bb 10 #define TORQUE_LIMIT __float_reg[3] // Torque limit (current limit = torque_limit/(kt*gear ratio))
benkatz 23:2adf23ee0305 11
benkatz 25:f5741040c4bb 12 #define PHASE_ORDER __int_reg[0] // Phase swapping during calibration
benkatz 25:f5741040c4bb 13 #define CAN_ID __int_reg[1] // CAN bus ID
benkatz 25:f5741040c4bb 14 #define ENCODER_LUT __int_reg[4] // Encoder offset LUT - 128 elements long
benkatz 23:2adf23ee0305 15
benkatz 23:2adf23ee0305 16 extern float __float_reg[];
benkatz 23:2adf23ee0305 17 extern int __int_reg[];
benkatz 23:2adf23ee0305 18
benkatz 23:2adf23ee0305 19 #endif