Content originally posted in LPCWare by bavarian on Mon Aug 04 04:53:56 MST 2014
Hello Hugo,
please consider one thing: processing an interrupt takes time. Whatever the GPIO pad is physically able to do, the determining factor is the time you spend on going into the ISR and run the ISR. It takes you 12 cycles to get into the ISR, so even if you run at 204MHz and do nearly nothing in the ISR you could achieve maybe a 10MHz turnaround period.
If you want to achieve frequencies of 20 to 40MHz you need to work without interrupts (just use the timer as PWM generator, use handwritten linear code to toggle the GPIO in some way or use the SCT block to do things (hardware controlled state machine).
The IO pads on the LPC4330 are normally good for 120MHz, as many of them are used for the external memory interface which can run on this frequency. But the typical values provided in the user manual should be the basis for your design.
The internal oscillator should be accurate within its specification of +/- 1%, so there could be a deviation.
This can be further trimmed, if this is not sufficient an external crystal must be used.
Regards,
NXP Support Team