Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: BLDC_V2 mbed-dev-f303 FastPWM3
Config/hw_config.h
- Committer:
- Wooden
- Date:
- 2021-04-07
- Revision:
- 48:a74e401a6d84
- Parent:
- 47:f4ecf3e0576a
File content as of revision 48:a74e401a6d84:
#ifndef HW_CONFIG_H
#define HW_CONFIG_H
#define PIN_U PA_8
#define PIN_V PA_9
#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.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.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
#endif