bldc driver firmware based on hobbyking cheetah compact

Dependencies:   BLDC_V2 mbed-dev-f303 FastPWM3

Dependents:   BLDC_V2

Revision:
48:a74e401a6d84
Parent:
47:f4ecf3e0576a
--- a/Config/hw_config.h	Wed May 13 09:53:27 2020 +0000
+++ b/Config/hw_config.h	Wed Apr 07 10:12:43 2021 +0000
@@ -6,9 +6,11 @@
 #define PIN_W PA_10
 #define ENABLE_PIN PB_5        // Enable gate drive pin
 #define LED         PB_0        // LED Pin
-#define I_SCALE 0.080566406f  // Amps per A/D Count    3.3v/4096/20/0.0005
+// #define I_SCALE 0.080566406f  // Amps per A/D Count    3.3v/4096/20/0.0005
+// #define I_SCALE 0.026855f       // Amps per A/D Count    3.3v/4096/20/0.0015   for 1.5m omega current shunt
+#define I_SCALE 0.040283f
 // #define V_SCALE 0.00884f        // Bus volts per A/D Count    
-#define V_SCALE 0.015087891    // Bus volts per A/D count, 3.3/4096*(39+2.2)/2.2
+#define V_SCALE 0.015087891f    // Bus volts per A/D count, 3.3/4096*(39+2.2)/2.2
 #define DTC_MAX 0.95f          // Max phase duty cycle
 #define DTC_MIN 0.05f          // Min phase duty cycle
 #define PWM_ARR 0x8CA           /// timer autoreload value