MIT Motor FOC Control

Dependencies:   FastPWM3

Committer:
benkatz
Date:
Sun Mar 03 02:51:51 2019 +0000
Revision:
48:74a40481740c
Parent:
47:e1196a851f76
Child:
55:c4c9fec8539c
Working on the new hardware

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 48:74a40481740c 10 #define V_SCALE 0.012890625f // Bus volts per A/D Count
benkatz 47:e1196a851f76 11 #define DTC_MAX 0.94f // Max phase duty cycle
benkatz 47:e1196a851f76 12 #define DTC_MIN 0.0f // Min phase duty cycle
benkatz 27:501fee691e0e 13 #define PWM_ARR 0x8CA /// timer autoreload value
benkatz 20:bf9ea5125d52 14
benkatz 48:74a40481740c 15 static float inverter_tab[16] = {2.5f, 2.4f, 2.3f, 2.2f, 2.1f, 2.0f, 1.9f, 1.8f, 1.7f, 1.6f, 1.59f, 1.58f, 1.57f, 1.56f, 1.55f, 1.5f};
benkatz 20:bf9ea5125d52 16
benkatz 37:c0f352d6e8e3 17
benkatz 20:bf9ea5125d52 18 #endif