Code:
freq=4000 'test frequency
 hpwm 1,duty,freq 'Start PWM
 HPWM 2,duty,1000 ' Send duty cycle PWM signal at 1kHz
I know one thing that's not right. You can not have two different frequency on each HPWM channel. They must be set to the same frequency. Duty cycle can be changed independently. You are rapidly setting HPWM1 to freq and then HPWM2 to 1000hz it never gets a chance to start.