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.

High absorption Current in mode LPM4.

Other Parts Discussed in Thread: MSP430F2121

Hi Team,
I have problems with the absorption mode LPM4 in order to  MSP430F2121, in the datasheet  is  reported consumption are around 100 - 500nA at 3V,

while  I have a power consumption of 20 uA.

Please could you help me?

I attached the schema and C  code I am using.
Any suggestion is well accepted

8078.MiniRXFM.pdf

1261.main.c
//------------------------------------------------------------------------------------------//
//                         Progetto telecomando 433,92Mhz                                   // 
//------------------------------------------------------------------------------------------//
#include <io430.h>
#include <in430.h>
//#include <io430x12x.h>
#include "DefineV.h"
#include <stdio.h>
#include <intrinsics.h>
//------------------------------------------------------------------------------------------//

//------------------------------------------------------------------------------------//
// Dichiarazioni variabili globali
//------------------------------------------------------------------------------------//
char Waiting4ACK;
char ShiftReg;
char volteTX=1;
char TXBuffer[16];
char RXBuffer[16];
int gl_conta16;
char TXBufferIndex;
char RXBufferWriteIndex;

//enum StateType {IDLE_STATE=0,TX_STATE=1,TX_PN9_STATE=2,RX_STATE=3};
// Counter variables

unsigned char gl_BitCounter;
unsigned int gl_CheckSum;
// Contains the total number of bytes to send in TX, including preamble and header
char BytesToSend;
// The number of bytes of data to receive in RX
char BytesToReceive;
char classe=24;

struct 
  {
   unsigned Listen2Pegaso:1;
   unsigned Trasmetti:1;
   unsigned TrasmettiSV:1;
   unsigned :1;
   unsigned :1;
   unsigned :1;
   unsigned :1;
   unsigned :1;
  }	
  AuxFlags;
  char ack_ricevuto_ok;
  char tasto;
//---------------------------------------------------------------------------//
//Dichiarazione prototipi Funzioni
//---------------------------------------------------------------------------//
void port_init(void);
void init_devices(void);
unsigned int writeCmd(unsigned int cmd);
void FIFOReset();
void rfInit(void);
void rfSend(unsigned char data);
void Set_TX_mode(void);
void Set_RX_mode(void);
void Set_sleep_mode(void);
unsigned char rfRecv();
void delay1ms(void);
void delay75us(void);
void delay150us(void);
void delay300us(void);
void delay1700us(void);
void delay_Xms(unsigned int ms);
void Rispondi_ack(void);
void OK_Condition(void);
char attesa_timer(unsigned int ttm);
void stopTimer(void);
void startTimer(int time);
void Prepara_cod(void);
char attesa_ack(void);
void Finto(void);
//---------------------------------------------------------------------------//
//Inizializza i registri e I/O
//---------------------------------------------------------------------------//
void init_devices(void)
{
 //stop errant interrupts until set up
 //_DINT();   //disable all interrupts
 //ME2=0X00; //disable sfr peripherals............
 IE1=0x00; //disable sfr interrupts
 IE2=0x00;

 //watchdog initialisation including nmi function
 //WDTCTL=0x5A00 | 0x00;
 //WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
 WDTCTL = WDTPW + WDTHOLD;
 //initialise other peripherals
port_init();
 
  //clock_init();

 //timera_init();
 
// PUart_init();
 
 //EINT(); //re-enable interrupts
}
//--------------------------------------------------------------------------//
//Init Porte
//--------------------------------------------------------------------------//
//--------------------------------------------------------------------------//
//Telecomando vecchio 
void port_init()
{
 P1OUT=0x00;
 P1DIR=0x0E;
 //P1IES=0x01;
 //P1IE=0x00;
 //P1SEL=0x00;

 P2OUT=0x00;
 P2DIR=0x01;
 P2IES=0x00;
 P2IE=0x00;
 P2SEL=0x00;

 P3OUT=0x08;
 P3DIR=0xCA;
 P3SEL=0x00;
}
//vedere per il nuovo
/*
void port_init()
{
 P1OUT=0x00;                        //
 P1DIR=0xE6;                        //
 //P1IES=0x01;                        //
 //P1IE=0x00;                         // 
 //P1SEL=0x00;                        //

 P2OUT=0x00;                        //
 P2DIR=0x31;                        //
 P2IES=0x00;                        //
 P2IE=0x00;                         //
 P2SEL=0x00;                        //
 P3OUT=0x08;                        //  
 P3DIR=0x1A;                        //
 //P3DIR=0xDA;    
 P3SEL = 0x00;                      //                          
}
*/
//-----------------------------------------//
//Ok ho ricevuto e segnalo con lampeggio led
//-----------------------------------------//
void OK_Condition(void)
{
  unsigned char volte_lam;
  volte_lam=5;
  while(volte_lam--){
	LEDON1;
        delay_Xms(50);
	LEDOFF1;
	delay_Xms(50);
    }		   
}
//------------------------------------------------------------------------------------------//
//                                     MAIN                                                 // 
//                                                                                          //
//------------------------------------------------------------------------------------------//
int main( void )
{
char i;  
  __disable_interrupt();
 init_devices();                 //Inizializzazione periferiche
  ON_PW;
  PSEL_high;                     //portare basso quando devo abiltare RFM12B
  PCLK_low;                      //clock basso
   tasto='W';                      //
            
 delay_Xms(150);  
 rfInit();                       //init device rf 
 FIFOReset();                    //reset fifi0 device RF
//--------------------------------------------//	
                              //ritardo per stabilizzare modulo radio
  AuxFlags.Trasmetti = 1;                     //abilito flag  trasmissione
 // __enable_interrupt();                       //
while(1){
  LEDON;
  Set_TX_mode();
  //Finto();
           
      if(!(TST1))
            tasto='C';                        //
      if(!(TST2))
            tasto='D';                        //
      if(!(TST3))
            tasto='E'; 
//----------------------------------------------//      
   if( AuxFlags.Trasmetti==1) {                 //per abilitare 
              volteTX='1';                      //
                Prepara_cod();                    //
                Set_TX_mode();                    //abilito tx_mode 
	        delay_Xms(5);                     //
	        ack_ricevuto_ok=1;                //
	        writeCmd(0x0000);                 //
		rfSend(0xAA);                     //
		rfSend(0xAA);                     //
	        rfSend(0xAA);                     //
		rfSend(0x2D);                     //
		rfSend(0xD4);                     //
		for(i=1;i<16;i++){                //
		  rfSend(TXBuffer[i]);            //
	          }
		rfSend(0xAA);                     //
		rfSend(0xAA);                     //
	        rfSend(0xAA);                     //
		delay_Xms(1);                     //
		volteTX++;                        //
	}	
	    if(attesa_ack()){
		   ack_ricevuto_ok=0;             //
		   goto sleep_ON;                 //
		 }  
		if((volteTX <=10) && (ack_ricevuto_ok==1)){; 
		   AuxFlags.Trasmetti=1;        //perch� ho trasmesso una trama                  
		    goto no_ok_tx;              //non ho ricevuto OK da Centrale      
                }				//					  
		
		 delay_Xms(100);                //
		 goto no_ok_tx;                 // 			  
sleep_ON:	
                AuxFlags.Trasmetti=0;	                 
		LEDOFF;
		volteTX=1;
		Set_sleep_mode();
		delay_Xms(100);
                OFF_PW;
		
		LPM3;    
no_ok_tx:		      
		//Set_TX_mode();
		delay_Xms(100);
 }
  //return 0;
}

Best Regards

Pierluigi

  • PIerluigi Rossetti said:
    LPM4 in order to  MSP430F2121, in the datasheet  is  reported consumption are around 100 - 500nA at 3V,
    while  I have a power consumption of 20 uA.

    These 100-500nA are for teh case that you have every peripheral inactive, no current draw on the port pins and all unused (unconnected) port pins set to low outputs.

    I don't know how your circuit looks like, but I'm pretty sure you have some outputs still at high state and some unconnected pins in (floating) input state.

**Attention** This is a public forum