ADSP BF506F EZ kit Lite - PWM generation


Presently I am working on ADSP BF506F processor, and I want to generate a single phase PWM waveform. I configured all the registers and enabled ports to connect to the oscilloscope. The code is attached and I connected to the P314 and P31 ground on the board to collect the output.

Please can any one evaluate my code and suggest me the changes.