Your first problem is that you are enabling clock at the end. This should not be understood as clocking the PWM counter, but clocking the module at all. No clock = no effect. In general when a module which is not clocked is written to or read from the chip should either do nothing or raise some sort of fault. SAM4 does the former (no effect). First thing you do in order to communicate with any peripheral in ARM powered microcontrollers is usually to enable power/clock to that module.
So the line:
pmc_enable_periph_clk(ID_PWM);
should be the first one, as all previous lines do nothing.
In general PWM config in SAM goes like this:
-configure gpio. Make sure that 'GPIO' bits are off, you want it to be peripheral output, not GPIO. Assign correct peripheral to that pin (letters from A to D)
-using syntax like this:
PWM->PWM_CH_NUM[channel_number_here].[perticular_register]
for example
PWM->PWM_CH_NUM[0].PWM_CMR = something
There are 4 registers for every PWM channel
PWM_CMR - mode register - sets clocking, data alignment and other stuff like that
PWM_CPRD - pwm period
PWM_CDTY - duty cycle register (mus be smaller than SPRD or PWM won't work
PWM_DT - dead time - useful when using PWM to generate complementary outputs driving a half-bridge power stage
there are also general registers which are shared between all channels:
PWM_FPE - fault detection - cam be set to 0 in order to disable this
PWM_SCM - channel sync registers, advanced stuff that you can find out on your own
PWM_DIS / PWM_EN - enable, disable channels
PWM_IFR1/IDR1/IER1/IFR2/IER2/IDR2 - interrupt control
PWM_CLK - more clock control