9 years, 10 months ago.

Standard Speed of CPU

I have a problem running a program in the K22F; it basically runs slower than on it's little sibling the K10.

The difference is that the K10 is a Teensy, programed with the Arduino software. The K22F program done with the mbed online compiler. The code is identical.

Do I need to do anything to make the K22F run faster? What are the standard clock settings using mbed?

1 Answer

9 years, 10 months ago.

The K22F runs on its max speed in mbed: 120MHz CPU clock, 60MHz bus clock. There is currently a bug that the SPI seems to run at the wrong speed, so if you got SPI modules on it those will take more time.

Edit: By the way what kind of code are we talking about. I have seen trigonometric functions running on Arduinos at speeds which are not possible, so which could only happen due to really large approximations which speed up processing. While I never looked further in it, are you sure the two compiles have similar accuracy? (This is relevant when using square roots, sine, etc. Just multiplications etc should not be affected, assuming of course you do have equal variable size (eg 32 bit)).