First of all, when you want to change the values in the registers REG_PWM_CPRD0 and REG_PWM_CDTY0 during your programm code, you need to use REG_PWM_CPRDUPD0 and REG_PWM_CDTYUPD0 to update the values (the direct write to the registers works only once, for initialization).
The way PWM works in principle is that you have one register that counts clock cycles. It counts up until a cerntain value is hit that is written in a compare register (here REG_PWM_CDTY0), then the state of your output pin gets inverted. Then the counter continues to count until the value of a second register is hit (here REG_PWM_CPRD0), inverts again the state of the output pin and resets your counter. Then everything starts again.
This creates a signal that has a total period given by the value in the REG_PWM_CPRD0 register. During this full period, there is the choice after how many clock cycles the output state should toggle (which determines the duty cycle), that is given by the value in REG_PWM_CDTY0. Therefore, if the value in REG_PWM_CDTY0 is larger than the one in REG_PWM_CPRD0, the output state never toggles and you have a constant signal.
This is why setting "REG_PWM_CPRD0 from 5000 to 500." doesnt work as long as you dont change the duty cycle register to something below 500 (to 250 for 50% duty cycle). So if you want a 50% duty cycle PWM the value in CPRD should always be twice as large as the one in CDTY. With the value in CPRD you set the PWM period because it simply determines how many clock cycles should be counted during one PWM period.
You can read more about this in chapter 39 in the datasheet of the SAM3X8E. (http://www.atmel.com/Images/doc11057.pdf