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.

SPI low enable power consumption

Other Parts Discussed in Thread: MSP430G2553, MSP430FR5739

Hi Guys,


I am working on SPI with a MSP430 as master and need to keep a slave device high to disable it (or at least that's what's recommended). It the MSP is off (i.e. LPM3 or 3.5 depending on which platform I'll be using)  can the /SS output pin be kept high whilst the MSP is asleep (don't think so...)?

If not what's the best way around this? Should I just keep the line low anyway as no signal is fired from the MSP?


Thanks

  • This should be possible if you use a GPIO to control the slave select line. Are you using one of the peripheral modules (eg USCI, eUSCI) to perform the SPI communication?

    EDIT: Missed the tags that say you're working on MSP430FR5739/MSP430G2553

  • Hi Robert,


    I am using a GPIO pin to control the /SS line. I'm using MSP430G2 and the USCI module.

    If I leave the /SS pin high to disable the SPI slave will  this consume power?

    Thanks

  • stefano sabbatucci said:
    If I leave the /SS pin high to disable the SPI slave will  this consume power?

    I think that would depend on the external circuit and the SPI slave.

    If I were to hazard a guess I'd say the slave's unlikely to have a pulldown on the /SS input, in which case driving it high would probably not cause a significant flow of current.

  • Silly question...if the MSP430 is in LPM can any pin (LED, GPIO, etc) be high? I thought that putting the MSP in LPM would disable all the I/O pins...I am wrong?

  • stefano sabbatucci said:

    Silly question...if the MSP430 is in LPM can any pin (LED, GPIO, etc) be high? I thought that putting the MSP in LPM would disable all the I/O pins...I am wrong?

    In general the digital IO ports work as usual during LPM - input, output and interrupts all work as normal. The LPM x.5 modes lock the pin states and require special handling after wake-up, but the MSP430G2xx range doesn't support those modes anyway.
  • Hi Robert,


    I thought that going into LPM would disable all the pins to save power when in fact that bit of house keeping needs to be taken care of...good to know!


    Thanks for your help,  much appreciated.

    Stefano

  • LPMs disable the CPU and the clocks (to different extent). They don’t disable I/O 8or it would be impossible to wake up from LPM by I/O activity). Also, it is really rare that in times the CPU doesn’t have to do anything, the external peripherals won't need their signals. Usually, they don't care whether the CPU is busy or idle and want their signals all the time.

    Imagine a PC where the keyboard and the video output go off as soon as the CPU is idle and enters a low power state.
    If you want your I/O to have a specific state during LPM, then you must set it into this state. There is no ‘default’ that will always fit.

  • Hi Jens-M,


    Thanks for your reply.

    What you say makes perfect sense. Just to explain better what I'm doing...I am using the msp430 with an RFID chip via SPI and it (RFID chip) requires a high signal to deselect the /SS line (usual for SPI slaves).

    I guess my question, perhaps silly, would be:

    If I keep a high signal from the 430 would that not consume power? If so, is the best way around this to put an inverter?

    Thanks

  • The only way to provide a signal that doesn’t consume power is to not put any load on it.
    If the MSP puts an output pin high, it draws no power by itself. CMOS technology consumes only power (actually a certain amount of charge) when it is changing state. However, if the attached device has a less-than-unlimited input impedance, then it draws some current, which must be provided by the MSP to keep the signal on its level. There’s nothing anyone can do to change this. Else electronic devices wouldn’t draw any current at all and could run eternally from a button battery.

    BTW: if you use an inverter, then the direction of the current simple reverses and the inverter is providing the power to the device. Nothing changes – except to the worse due to the additional inverter input current.

    See the slave signal input as a resistor to GND. If you want to have a voltage (high signal) on the resistor, you need to send current through it. If you stop the current, you’ll have no voltage. The basic U=R*I law. The larger the resistor (the slave input impedance), the smaller the current, but this is nothing you can influence form outside.

  • Hi Jens,


    It is as I thought...basically a high signal to keep the SPI slave device deselected means I will have some current/power consumption, the amount of which is basically down to the input impedance of the slave device...

    Am I right in presuming that for applications that run off battery sources the only way is to measure the current when a slave device is kept deselected and basically factor this in?

    Thanks for your precious input.

  • Depending on device and situation, there might be other solutions (like using a FET which does not draw any static gate current, to switch of the power of the slave instead of feeding its shutdown input), but in general, yes, the current drawn by any attached device input, even in inactive state, must be taken into account when calculating battery life time.

**Attention** This is a public forum