Hello,
Has anyone seen an issue where 0% duty cycle passed into the ROM_PWMPulseWidthSet function does not shut down the channel completely - I get a 0.2% duty cycle on the channel?
typedef struct
{
SINT16 frequency; //!< desired frequency in Hz
SINT32 frequency_icr; //!< desired frequency in ICR counts
SINT32 OCR_duty_cycle_base; //!< Output Compare Register value to obtain duty cycle value
SINT32 duty_cycle; //!< see above
} PWM_PROPERTIES_S;
PWM_PROPERTIES_S pwmProperties[PWM_NUM_CHANNELS];
temp = pwmProperties[pwmID].frequency_icr; //400Hz in ICR counts
temp *= pwmProperties[pwmID].duty_cycle; //0%
temp /= 100;
pwmProperties[pwmID].OCR_duty_cycle_base = temp;
//PWM OUTPUT
ROM_PWMPulseWidthSet (PWM0_BASE, PWM_OUT_0, pwmProperties[pwmID].OCR_duty_cycle_base);