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.

Power consumption RAM vs. FLASH MSP430F5438

Other Parts Discussed in Thread: MSP430F5438

Hi,

 

We have a question.

We are trying to take measures of the consumption of a MSP430F5438 in order to compare the performance of executing in RAM and in FLASH.

According to the datasheet of this micro the current consumption executing from RAM should be half the current from FLASH.

We used 3V power DC supply and connected an ampere-meter to test this. We used a simple program with a relative jump -1 and used everything configured as default. The values of current for both FLASH and RAM execution were the same (starting with 4.8mA and then going down to 2.8mA).

 

Thanks in advance for any help.

Regards,

Majo.

  • Majo,

    A couple of thoughts for you. 

    First, you should be sure all unused MCU pins are configured as outputs or at least as pulled up/down inputs.

    Second, the '5xx series flash controller uses a 32-bit latch that can prevent flash read operations during a JMP $ operation.  You might want to run your test with a sequence of two NOP operations followed by a JMP back to the first NOP.

    Jeff

  • Hello,

    An important point is that If you wish to measure Average Current or Running current. As if its Average Current then you should also consider the time the Processor can go to any of the LPM modes. In case of running current you can measure the instantaneous value. As rightfully suggested in the Earlier post  you also need to focus on the unused I/O to reduce the total power consumption. it sames that the micro is running of the DCO so you can also look to shut down the DCO and run using VLO source.

    Warm Regards,

    Boseji

    http://m8051.blogspot.com

  • Jeff Tenney said:
    Second, the '5xx series flash controller uses a 32-bit latch that can prevent flash read operations during a JMP $ operation.

    Not 'can' but 'will', since the JMP $ takes only two bytes and therefore always executes from out of the latch, not causing any flash-read-related current after the first loop.
    Depending on the memory location, one NOP might be enough, but two NOPs will certainly cause the latch to be reloaded over and over again.

     

  • JMG - Actually it depends on which half of the 32-bit latch holds the JMP $ instruction.  See SLAA470.  JMP $ can prevent flash read operations but doesn't necessarily do so.

    Majo - Do you have MCLK turned up fairly high?  Just noticed you said 2.8mA.  That's quite a lot if MCLK is only 1MHz (default).

    Jeff

  • Jeff Tenney said:
    Actually it depends on which half of the 32-bit latch holds the JMP $ instruction.

    Sure? I'm not sure whether a JMP$ will actually fetch the instruction after the JMP at all. If it does, then you're right.

    I wonder whether settign  a breakpoint right behind a JMP instruction will trigger on teh (superfluous) fetch.

  • Thanks for all your answers.

    We took some of your advices and we got good results. Putting all the ports as outputs we observed a difference between the consumption executing from RAM and Flash. The results we obtained are really close to what is declared in the datasheet. We run a couple of programs, one with a JMP 3FFF and a FIR filter. There is no big difference in the consumption of one and the other.

    Thanks again for your advices

    Majo 

**Attention** This is a public forum