Content originally posted in LPCWare by elef on Mon Jul 16 19:49:57 MST 2012
The hardware is capable of toggling using a single 2 cycle instruction.
Given that your LPC11C24 runs at 50MHz Max, the fastest toggling you can get on your GPIO is 25MHz. Because your logic analyser is 20Mhz max and you can't measure 25Mhz, i suggest try run your CPU at say 12Mhz, and you should see your GPIO speed at 6MHz.
But as kayoda said, don't waste your cycles on branching through a while(1) loop.