Small update

This commit is contained in:
Benjamin Vedder 2014-03-21 17:44:41 +01:00
parent 8636847610
commit a1e5a3ca7c
2 changed files with 2 additions and 2 deletions

View File

@ -1061,7 +1061,7 @@ void mcpwm_adc_int_handler(void *p, uint32_t flags) {
}
}
if (pwm_adc_cycles > pwm_last_adc_cycles / 4) {
if (pwm_adc_cycles > pwm_last_adc_cycles / 3) {
int inc_step = 0;
int ph1, ph2, ph3;
int v_diff = 0;

View File

@ -101,7 +101,7 @@ extern volatile int mcpwm_vzero;
#define MCPWM_AVG_COM_RPM 6 // Number of commutations to average RPM over
#define MCPWM_NUM_POLES 2 // Motor pole number (for RPM calculation)
#define MCPWM_HALL_SENSOR_ORDER 5 // Order in which hall sensors are connected
#define MCPWM_RAMP_STEP 0.03 // Ramping step (1000 times/sec) at maximum duty cycle
#define MCPWM_RAMP_STEP 0.02 // Ramping step (1000 times/sec) at maximum duty cycle
#define MCPWM_CURRENT_MAX 40.0 // Current limit in Amperes
#define MCPWM_CURRENT_MIN -20.0 // Current limit in Amperes
#define MCPWM_IN_CURRENT_LIMIT 40.0 // Input current limit in Amperes