This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP432P401R: MSP432 slow speed

Part Number: MSP432P401R

Hello,

We face a major problem, in which the MSP432 processor runs very slow.

The processor is fed by 32.768KHz crystal. The DCO is configured to output DCOCLK = 48MHz. MCLK (48MHz), HSMCLK (24MHz) and SMCLK (24MHz) are driven by DCOCLK.
ACLK (32.768KHz) is driven by LFXTCLK.
The Cortex M4 core runs on internal VCore1 (1.4V), either using the internal LDO or the internal DC-DC.

The number of waits-states for the Flash accessset to 1 wait state; Flash buffering is enabled (for Code and Data).

MCLK and HSMCLK were output to GPIOs and verified to have the right frequency.

The disassembly of the code snippet and the Clock System register values are attached.

The "P5->OUT = ~pinMask" line takes 165 nano seconds to run, as measured on scope.

This runtime seems to be very high.

There is not much difference when running this code from RAM.

Any idea why it takes so long?

Any idea how to speed up the processor?

Thanks in advance,

Avi Miller

Ido Gazit

 

  • Ido,

      There is a latency associated with accesing the peripheral as described here ().

    Regards,
    Chris

  • > The "P5->OUT = ~pinMask" line takes 165 nano seconds to run, as measured on scope.

    My calculator says that at 24MHz , one clock is 41.6 ns. I see load-immed/load-memory/store, which is about 4 clocks, or about 166ns.

    The optimizer (-Ospeed) will probably get rid of the load-memory(s), and might even allocate separate registers to pinMask and (~pinMask).
  • Hi,

    I believe that the right calculation would be:

    Since the Fetch--Decode--Execute Pipeline is fully populated:

    The first two assembly commands should take 1 MCLK (48 MHz) each.

    The third command, STRB, accessing the GPIO Port OUT register, should take 1 HSMCLK (24 MHz), which is 2 MCLKs.

    Totaly: 4 MCLKs = 20.83 * 4 = 83.3 nano seconds.

    But the measured time is twice that value, 165 nano seconds.

    AM I mistaken?

    Regards,

    Avi Miller

  • I can't say you're wrong. My point was that your observations aren't far off from the range that might be expected.

    I would be instructive to try variations on your experiment, to see how they affect the result (e.g. I suggested "-Ospeed"). DDI0439B sec 3.3.2 has a list of considerations you might want to watch for.

**Attention** This is a public forum