Hi,
First of all, I think the LPC4330 can execute the ISR(Interrupt Service Routine) with 1MHz or 2MHzif the ISR is simple enough, it can not execute a ISR with 21.5Mhz.
I have checked the triggering signal of SGPIO, the triggering signal frequency is about 3KHz, of course, it is okay. But the pulse duty cycle is very small(about 10uS), can you increase the duty cycle?
In the ISR, you can make the ISR as simple as possible to cut the executing time, for example, just in ISR, you can just clear the flag and toggle a GPIO.
BTW, you can use Pint module to generate interrupt with external pin triggering, for detailed inf, pls refer to section Chapter 19: LPC43xx/LPC43Sxx GPIO
hope it can help you
BR
XiangJun Rong