Ye, but it is mikroC PRO ARM Compiler code. To compile my code for different clock frequency just download and install the demo version of mikroC PRO ARM Compiler from mikroElektronika.
My goal is to understand exactly what happens - not just to make the LED blink.
Can you post the whole code please - with the initialization functions and the include statements.
Please read the posts properly. The code I have posted is for "mikroC PRO ARM Compiler" and not IAR ARM. Please post your IAR ARM C Code. I will test it.