I want to generate complementary PWM on an Arduino due. For that purpose I am programming the cortex M3 using the PWMC library. In order to set the duty cycle I have to set a value in CDTY channel register of the Cortex M3.
The formula for calculating the duty cycle of a center aligned PWM is given in the SAM3X datasheet as,
Now I don't know what is the value of the variable "fchannel_x_clock" in this formula. If I get to know that, I can easily find the value of the CDTY to get my desired duty cycle using the above formula.
Link to the complete datasheet: http://www.atmel.com/Images/Atmel-11057-32-bit-Cortex-M3-Microcontroller-SAM3X-SAM3A_Datasheet.pdf
The formula above is in the PWM section of the data sheet.