Firmware changes for Rev 4 PCB
Firmware changes for Rev 4 PCB
This commit is contained in:
@@ -103,7 +103,7 @@ enum {
|
||||
#define VOLTAGE_REF_R2 1000
|
||||
#define CURRENT_REF_R2 137
|
||||
#define CURRENT_REF_MUL (100.0 * 2700 / CURRENT_REF_R2) // 2700 from datasheet
|
||||
#define CAP_PRECHARGE_PERIOD 50 // ms
|
||||
#define CAP_PRECHARGE_PERIOD 2000 // ms
|
||||
|
||||
#define REG_SCALE 100
|
||||
#define AVG_SCALE 3
|
||||
|
||||
@@ -369,14 +369,14 @@ static void validate_input_voltage() {
|
||||
static void charge_caps() {
|
||||
IO_PORT_SET(SHUNT_PIN); // Disable shunt (hi)
|
||||
|
||||
delay(1000);
|
||||
delay(100);
|
||||
IO_PORT_SET(PC2_PIN); //Enable pre-charge circuit
|
||||
delay(CAP_PRECHARGE_PERIOD); //Wait for Vs caps to charge
|
||||
IO_PORT_CLR(PC2_PIN); //Disable pre-charge circuit
|
||||
delay(1);
|
||||
//delay(100);
|
||||
|
||||
IO_PORT_SET(MOTOR_PIN); // Motor voltage on
|
||||
delay(CAP_CHARGE_TIME);
|
||||
//delay(CAP_CHARGE_TIME);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user