I want to generate 30Khz pwm freq with two channels based on later selection on which frequency is to operate.
here is my configuration.
Code: Select all
static PWMConfig pwmcfg = {
30000, /* 10kHz PWM clock frequency. */
1000, /* Initial PWM period 1S. */
pwmpcb,
{
{PWM_OUTPUT_ACTIVE_HIGH, pwmc1cb},
{PWM_OUTPUT_DISABLED, NULL},
{PWM_OUTPUT_DISABLED, NULL},
{PWM_OUTPUT_DISABLED, NULL}
},
0,
0
};
typedef struct {
uint32_t frequency;
pwmcnt_t period;
pwmcallback_t callback;
PWMChannelConfig channels[PWM_CHANNELS];
} PWMConfig;
uint32_t frequency; is this timer base frequency?
pwmcnt_t period; is this pwm freq?
i gone through documentation, but it is confusing me?