bldc driver firmware based on hobbyking cheetah compact
Dependencies: BLDC_V2 mbed-dev-f303 FastPWM3
Diff: Config/hw_config.h
- Revision:
- 47:f4ecf3e0576a
- Parent:
- 37:c0f352d6e8e3
- Child:
- 48:a74e401a6d84
--- a/Config/hw_config.h Mon Jul 30 20:33:23 2018 +0000 +++ b/Config/hw_config.h Wed May 13 09:53:27 2020 +0000 @@ -1,13 +1,14 @@ #ifndef HW_CONFIG_H #define HW_CONFIG_H -#define PIN_U PA_10 +#define PIN_U PA_8 #define PIN_V PA_9 -#define PIN_W PA_8 -#define ENABLE_PIN PA_11 // Enable gate drive pin -#define LED PC_5 // LED Pin -#define I_SCALE 0.02014160156f // Amps per A/D Count -#define V_SCALE 0.00884f // Bus volts per A/D Count +#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 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 DTC_MAX 0.95f // Max phase duty cycle #define DTC_MIN 0.05f // Min phase duty cycle #define PWM_ARR 0x8CA /// timer autoreload value