Max bitrate that simple code can generate

I am a little disappointed in ARM mcu’s. I need to produce 14MHz output on a pin depending on a simple calculation actually looking up to RAM. When I read that STR9 was 96MIPS I hoped that it can easyly handle that task. However, even as a flip flop I could not exceed 1.5MHz.

I set PLL to 96 Mhz and all divisions to 1. Construct a loop that sets and resets the GPIO register. The loop consist of 5 instructions. Is that the top speed I can gather?

ARM chips generally have rather slow I/O. The later NXP chips use a faster I/O bus, but they are still slower than many 8-bit MCUs.

Leon

The STM32 has 3 output modes, 2, 10 and 50 MHz. Quite fast.

This probably won’t help enough, but you should be able to do a lot better than 5 instructions per loop. Loading all registers outside of the loop, and unrolling the loop, should get you arbitrarily close to 2 instructions per pulse.

Please consider using a CPLD anytime you need GPIO that fast (and the onboard PWM can’t cut it). It will likely only add $0.90 to your design.