Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // General config
- configSenseMaxThresh(THRESH_100MV);
- configCurrentLimit(1800, 100); //
- configSpeedFlags(DCC_DISABLED, DECEL_1);
- configSpeed(SpeedControlRes::RES_0_4HZ, 0, 820);
- configSpeedAccel(500, 31);
- configStopOnFail(ENABLED);
- configVLRvoltage(VLR_3_3V);
- configGateDrive(DRIVE_11V);
- configOperatingMode(SPI_ONLY);
- configWakeMode(WAKE_PWM);
- configPWMSense(PWM_DIRECT);
- configCurrentLimitEnable(ENABLED);
- configMotorMode(CLOSED_LOOP_SPEED);
- configDriveMode(SINUSOIDAL);
- configOvermodulation(OVM_100P);
- // PWM
- configPWM(PHASE3, ALIGN_CENTRE, 50000); // hz
- configDither(DITHER_1600NS, DWELL_1MS, 10); // 0 steps = dither disabled
- configBridge(GAIN_20, 600); // gain, dead time ns
- // Gate
- configGateCurrent(CUR_TURN_OFF, 0, 0); // drive turn-off current1, current2: mA, 0=switching
- configGateCurrent(CUR_TURN_ON, 0, 0); // drive turn-on current1, current2: mA, 0=switching
- configGateSlew(0, 0); // ns
- // Current Limiting
- configCurrentLimit(1000, 100); // blank time ns, scale %
- // VDS
- configVDSOvervoltage(1550); // mv
- configVDS(DEBOUNCE, 3150); // ns
- // Startup
- configStartupAlign(100, 3); // hold time ms, duty cycle percent
- configStartupMotor(COAST_OFF, DESYNC_RESTART_OFF, 750, RAMP_0P);
- configWindmill(DISABLED, 7, 50); // freq hz, duty cycle percent
- // Ramping
- const int rampStopHzx10 = freqx10 > 325 ? 325 : freqx10;
- configRamp(15, 3, rampStopHzx10, 3); // start freqx10 hz, duty, end freqx10, duty
- configRampStep(10, STF_2HZ); // step time ms, step freq
- configPhaseAdvance(ADV_AUTO, ADV_GAIN_4, 0); // mode, gain, degrees*10
- // BEMF
- configBEMFDetectWindow(560); // degrees*100
- configBEMF(SPC_6, BEMFFilterTime::BF_10MS); // samplecount, filtertime
- // Commutation control
- configCommSteadyPow2(0, 0); // P, I (pow2)
- configCommTransientPow2(0, 0); // P, I (pow2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement