mirror of https://github.com/rusefi/bldc.git
Small update
This commit is contained in:
parent
8636847610
commit
a1e5a3ca7c
2
mcpwm.c
2
mcpwm.c
|
@ -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 inc_step = 0;
|
||||||
int ph1, ph2, ph3;
|
int ph1, ph2, ph3;
|
||||||
int v_diff = 0;
|
int v_diff = 0;
|
||||||
|
|
2
mcpwm.h
2
mcpwm.h
|
@ -101,7 +101,7 @@ extern volatile int mcpwm_vzero;
|
||||||
#define MCPWM_AVG_COM_RPM 6 // Number of commutations to average RPM over
|
#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_NUM_POLES 2 // Motor pole number (for RPM calculation)
|
||||||
#define MCPWM_HALL_SENSOR_ORDER 5 // Order in which hall sensors are connected
|
#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_MAX 40.0 // Current limit in Amperes
|
||||||
#define MCPWM_CURRENT_MIN -20.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
|
#define MCPWM_IN_CURRENT_LIMIT 40.0 // Input current limit in Amperes
|
||||||
|
|
Loading…
Reference in New Issue