This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

lpc2148 runs slow

dear dun han you wrote
I had NOT enabled MAM before.
I enabled it and the system works correctly now.
Thank you for your useful advices.

same problem we have our led is 2-3 mhz.and we know we must see 30 mhz around.

which is correct about pll and MAM?

Parents Reply Children
  • Sorry, but the LPC21xx series has very slow I/O. It takes many cycles to toggle a pin since the pin is not on a local bus.

    You have to use a LPC23xx to get the newer I/O interface. But even then, you would get into troubles if you _need_ 1 cycle/operation.

    MAM will just speed up your instruction processing by caching memory accesses. But it can't help out with the slow transfers of I/O commands from the ARM core to the I/O module.

    Once more: You have to learn that
    m = milli = 0.001.
    M = mega = 1000000.
    Hz = hertz = periods/second.

    So mega-hertz is MHz not mhz. Small m is a difference of 1000000000 compared to M and that is a quite big difference...

  • Also LPC214x has a Fast GPIO Interface which should be used in order to achieve the best performance. The interface is enabled in SCS register and uses similar registers like legacy GPIO. Details are in the User Manual.

    Frequencies up to 15MHz can be achieved with proper code (CPU @ 60MHz).

  • Me bad. Yes, the LPC21xx can select between legacy and fast accessing modes for the two ports but will default to the legacy access mode.

  • i will look to SCS registers.thanks robert rostohar