TIDUCL0 January 2017
Select the "main.c" file. Parameters exist at the top of the file that can be optimized and are included as the configuration variables. The following section of code shows these parameters:
#define PWM_PERIOD 625 //PWM Frequency (Hz) = 25MHz/((2*PWM_PERIOD)-1)
#define MAX_DUTYCYCLE 625 //relative to PWM_PERIOD
#define MIN_DUTYCYCLE 50 //relative to PWM_PERIOD
#define ACCEL_RATE 320 // Ramp up time to full scale duty cycle = (Full scale duty cycle) * ACCEL_RATE * PWM_PERIOD/PWM_Frequency
#define DEAD_TIME 1 // Dead time from MSP430 = DEAD_TIME * 0.04 uS (for 25MHz clock)
#define Block_Rotor_Duration 1250 //Blocked_rotor shut off time(s) = Block_Rotor_Duration*30000/clock frequency