MIT Motor FOC Control

Dependencies:   FastPWM3

Committer:
benkatz
Date:
Fri Apr 13 13:50:54 2018 +0000
Revision:
37:c0f352d6e8e3
Parent:
27:501fee691e0e
Child:
47:e1196a851f76
always samples position sensor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
benkatz 20:bf9ea5125d52 1 #ifndef HW_CONFIG_H
benkatz 20:bf9ea5125d52 2 #define HW_CONFIG_H
benkatz 20:bf9ea5125d52 3
benkatz 20:bf9ea5125d52 4 #define PIN_U PA_10
benkatz 20:bf9ea5125d52 5 #define PIN_V PA_9
benkatz 20:bf9ea5125d52 6 #define PIN_W PA_8
benkatz 22:60276ba87ac6 7 #define ENABLE_PIN PA_11 // Enable gate drive pin
benkatz 37:c0f352d6e8e3 8 #define LED PC_5 // LED Pin
benkatz 22:60276ba87ac6 9 #define I_SCALE 0.02014160156f // Amps per A/D Count
benkatz 37:c0f352d6e8e3 10 #define V_SCALE 0.00884f // Bus volts per A/D Count
benkatz 22:60276ba87ac6 11 #define DTC_MAX 0.95f // Max phase duty cycle
benkatz 22:60276ba87ac6 12 #define DTC_MIN 0.05f // Min phase duty cycle
benkatz 27:501fee691e0e 13 #define PWM_ARR 0x8CA /// timer autoreload value
benkatz 20:bf9ea5125d52 14
benkatz 20:bf9ea5125d52 15
benkatz 37:c0f352d6e8e3 16
benkatz 20:bf9ea5125d52 17 #endif