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.

Run at overclock if executed from RAM

Other Parts Discussed in Thread: MSP430F5438A, MSP430G2553, MSP430F2618

I have question about execution from RAM in MSP430.

As far as I know, access time for FLASH is a lot slower than RAM.

Would it be possible to run codes at higer speed than maximum speed that datasheet suggests if codes were executed from RAM?

If not, what is the limiting factor that defines the maximum speed stated in MSP430 datasheet?

Besieds, what would happen if I applied far higher clock than datasheet states in general.

Thanks in advance.

  • In most cases, CPU itself is the limiting factor. Hence the max MCLK rate is unchanged whether you use Flash or RAM to store code. But FRAM can be slower than CPU. In that case, instead of slow down the clock, extra clock cycles should be added.

    If MCLK is higher than datasheet states (for the CPU voltage being used) the CPU may not function correctly. The consequence is unpredictable.

    (Note that TI is using the 8 MHz MSP430F16xx at 12 MHz in eZ  and LaunchPad.)

  • First of all, thanks for your answer.

    However, I'm afraid I still don't fully understand about your answer.

    To clarify my question, let's take an example.

    If a MSP430F5438A is running at its full speed (as stated in datasheet) of 25MHz (MCLK) using external crystal,

    does the 25MHz indicate CPU's maximum speed (with guaranteed safe operation)?

    In other words, are both SRAM and FLASH in the MSP430 faster than 25MHz?

    The example above is the case when speed of memory is faster than CPU.

    Then, let's consider opposite case; CPU is faster than memory.

    Because you also took an example of FRAM which requires extra idle cycles for adjusting difference in speed, this implies that overall speed of a MCU can be affected by memory.

    If so, there must be some difference in maximum capable speed of execution, depending on the source of codes: SRAM or FLASH.

    Since read access time of SRAM is typically shorter than of FLASH, does the MSP430 in this example require extra matching cycles?

    Could you please also provide me with any documents that explain this?

    Thanks in advance.

  • My answers are in BLUE

    To clarify my question, let's take an example.

    If a MSP430F5438A is running at its full speed (as stated in datasheet) of 25MHz (MCLK) using external crystal,

    does the 25MHz indicate CPU's maximum speed (with guaranteed safe operation)?

    CPU operates correctly between 20MHz and 25MHz only if (a) Vcc is between 2.4V and 3.6V and (b) PMMCOREVx setting is 3

    In other words, are both SRAM and FLASH in the MSP430 faster than 25MHz?

    Yes. And CPU may be even much slower, depends on Vcc and PMMCOREVx

    The example above is the case when speed of memory is faster than CPU.

    Then, let's consider opposite case; CPU is faster than memory.

    Because you also took an example of FRAM which requires extra idle cycles for adjusting difference in speed, this implies that overall speed of a MCU can be affected by memory.

    In this case (but not for MSP430F5738A), the FRAM controller can insert extra cycles.

    If so, there must be some difference in maximum capable speed of execution, depending on the source of codes: SRAM or FLASH.

    The max speed of CPU in different chips in MSP430 family may be different from each other. But in all cases I know of, SRAM and Flash in the chip are always faster than the CPU.

    Since read access time of SRAM is typically shorter than of FLASH, does the MSP430 in this example require extra matching cycles?

    No. The speed of CPU is slower than both SRAM and Flash.

    Could you please also provide me with any documents that explain this?

    See MSP430F5438A datasheet (slas655?.pdf). There is a Table showing Recommended Operating Conditions. Following that, there is a Figure showing Frequency vs Supply Voltage.

  • While working with another TI MCU (C2000 series Piccolo F28069) I was able to get a better performance with Math functions (2x array multiplication) executed from RAM rather than from FLASH. I have tried the same technique in MSP430G2553, but did not get any improvement. I have to note that MSP430G2553 does not have a hardware multiplier. More experiments are on a way, next I'm going to try MSP430F2618.

  • Arsen Norman said:
    While working with another TI MCU (C2000 series Piccolo F28069) I was able to get a better performance with Math functions (2x array multiplication) executed from RAM rather than from FLASH.

     This processor has nothing to do with MSP nor with ARM, is an hybrid between a 32bit processor and DSP. Cpu has some extra hardware to prefetch instruction and can make difference, MSP has simple execution unit and also speed is much lower than C2xxx. Overclocking an MSP I learned it work fine so RAM and or flash make no difference it can read from both more faster than recommended speed.

  • For most MSP430 (including MSP430F2628), executing from RAM is as fast/slow as from FRAM.
    For MSP430FR57xx at 24MHz, executing from RAM can be slightly faster from FRAM.
  • OCY, why do I see a huge difference in execution speed with C2000 series Piccolo F28069 MCU?
  • I think for C2000, the CPU is faster then the Flash, and its RAM is also faster then its Flash.
    MSP430FR57xx is like that too. But only slightly faster.
  • Thank you. That explains it.

**Attention** This is a public forum