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.

Max Current Consumption During Programming

Other Parts Discussed in Thread: MSP430F5510, CCSTUDIO

I'm trying to calculate the maximum current consumption that the MPS430F5510 may consume during flash programming. I intend to use the on-board supply (as opposed to the programmer supply) to power the MSP430 during programming, but want to make sure my supply can source sufficient current.

From the 5510 datasheet, I see that an erase operation can draw a maximum of 6.5 mA, which I would add to the active mode supply current. The question is what PMMCORE and frequency can I expect the MSP430 to be in during programming? Are there any other functions that I would need to add in?

  • It is entirely up to you to set up OMMCORE voltage and MCLK frequency. It is also up to you to enable/disable other peripherals. (But you are advised not to enable interrupts.)

    Unless your code resides in a different bank of Flash or in SRAM, the PC register will not advanced during Flash Erase or Write operation. Hence the CPU cannot do any useful task. 

  • I understand how to program my target code to change power levels, clock frequencies, and enable/disable peripherals. What I'm concerned about is before that happens, there is some work that gets done that I'm a little fuzzy on. Here's what I think is a typical flow:

    First, I start with a "blank" part (a fresh from the factory part contains BSL code and possibly some data in the info segments). The microcontroller's power comes up and it comes out of reset. No handshake is performed, so the BSL is not entered and the CPU sits at the reset vector in the default power state with a default DCO-sourced MCLK. I start a programming routine (initiated through Code Composer Studio or MSP430Flasher) using a MSP-FET430UIF. The FET430 causes the MSP430 to enter 4-wire JTAG mode and runs through the JTAG entry sequence, loads some flash access code into RAM, and either allows the CPU to run freely or keeps it under JTAG control (per http://www.ti.com/lit/ug/slau320o/slau320o.pdf Figure 1-14) while the flash erase/programming cycle runs.

    The flash access code is where the initial programming gets done, but that code comes from TI and I don't have any visibility in there. The SLAU320O document makes it sound like allowing the CPU to run freely would give the best programming performance, but doesn't really say much more than that. Maybe the best thing to do would be to measure a LaunchPad carefully during programming.

  • Not clear to me, what you want to do / measure. If you have some doubts regarding MSP430F5510 flashing current, made never ending loop for block write and execute it from RAM (there is example in MSP430F5xx family datasheet), and measure voltage / current by meter. Same for erase, never ending loop, and measure. Don't see any reason to putting this in any relation with LP / FET430UIF.

    If there is no other onboard components that are using 3.3V from internal MSP430F5510 reg, it is more than enough for flashing operation.

    I am running (timers and USB module are used) my flasher (based on msp430f5510) with 24 MHz XT2 (MCLK) on 1.8V VCC with default core voltage. Know that datasheet (that I always use as reference) says that this is impossible.

    Consumption depend on flashing time, shorter time, lower consumption. Here is max writing rate (KByte/s) for some MSP430F5xx samples that I have.

    D:\msp430>flash -p com21 -vcc 21 -wt

    Set VCC 2,1 V

    Get Device
    # JTID Fuse Device Core Hard Soft LotWafer DieX DieY
    0  91   OK   3081  2106  10   10  B7A50951 0A00 1100
    1  91   OK   5435  0100  10   10  ADE98146 0A00 2100
    2  91   OK   3080  1104  30   10  B15B9446 2000 1700
    3  91   OK   3180  1104  12   12  013BB046 1200 1E00
    4  91   OK   5435  0100  10   10  ADE98146 0400 2000
    5  91   OK   3881  1106  10   10  219CA446 1800 0F00
    6  91   OK   3180  1104  12   12  013BB046 0D00 1E00
    7  91   OK   3180  1104  12   12  013BB046 2A00 2100

    Write Test
    Smart  #0    #1    #2    #3    #4    #5    #6    #7
      0   106,5 100,6 105,6 102,1 102,6  93,8 102,3 103,4
      1   246,2 232,7 244,0 236,1 237,2 216,9 236,5 239,1

    Release Device

    Total Time: 172 ms

    D:\msp430>

  • Thank you both for responding so quickly. My concern is that I have a limited power supply before the microcontroller enables my main supply rails. During the first time I attempt to program the microcontroller in circuit, I'm worried that I may crash my micropower supply. The flash memory peripheral can draw a maximum of 6.5 mA, but this would be added onto the core current (active mode supply current) if I understand the datasheet correctly, which could range anywhere from an additional 0.19-6.5 mA , depending on the state of the core. So I'm trying to figure out whether I can get by with designing my micropower supply for ~7 mA min (worse case), or if I need to splurge for ~14 mA min.

  • What micro-power-supply do you use that can not handle 14mA to start with?
    Most LDO start at 150mA

    Isn't Flash burning mostly short spikes of power?
    and that a 4.7uF is there to help out if power comes from a power source with high ESR.

  • Details for the curious:

    The regulator I'm using will certainly handle the power, but I have a pre-regulator on the front end that consists of a high voltage BJT emitter-follower to protect the regulator from transient voltage spikes (e.g., 24 V automotive load dump). Because of the high voltage rating of the BJT, the gain is extremely poor. To minimize dissipation in the pre-regulator during a transient, I want to minimize base current, which limits the overall current into the regulator.


    As to the flash programming being short spikes, I don't have any knowledge of the duration or frequency of those spikes.

  • Try it by yourself and you will see. Run your flashing function with MSP430F5510 on minimum voltage 1.8V and measure current. If you want to run (and flash)  MS430F5510 from 5V USB on 3.3V, internal reg can be used, without need for any external LDO.

  • When flashing a device using CCStudio, either BSL or JTAG are used. Unless you have your own BSL, I don’t think any of the two (FET-injected code or BSL code) will switch the MSP into more than its standard configuration, as both don’t know the currently existing hardware situation (supply voltage etc.).
    So during programming, the MSP should run 1MHz active mode, and its current consumption there can be taken as a base. Of course, the JTAG interface current or the timer operating current as well as any I/O driving current will also occur. And finally the flash write current. (OCY: It is not likely that the BSL code flashes from flash, for speed reasons, and JTAG injects the flashing code into ram too, so the CPU is likely active during the flash write/erase operations)

    If the application receives and flashes the new data, then of course everything is possible.

**Attention** This is a public forum