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.

3D GLASS-----problems on TPS65835

Other Parts Discussed in Thread: TPS65835, MSP430G2553

HI everyone:

we are working on 3D Glass with TI's new chip TPS65835. In Datasheet of TPS65835 , a high to low transition on P3.0 will put the chip into SLEEP mode,and the current

will decrease to about 9uA.

I use the following code but it can't help make the chip into SLEEP mode.

//====================================================

#include "msp430g2553.h"


#define    SLEEP              BIT0

#define   LED                 BIT5

unsigned int count;

void main( void )
{
    WDTCTL = WDTPW + WDTHOLD;
        
    P2SEL |= BIT6 + BIT7;                        //LFXT1晶振口第2功能
    DCOCTL  = 0x22 ;                     
    BCSCTL1 = 0x8D ;                    
    BCSCTL2 = 0 ;                                //MCLK,SMCLK均没有分频 且为8MHz
    BCSCTL3 = XCAP_0 ;                  //LFXT1来自外部,ACLK=32768Hz 且匹配电容为6pF
    do
    {
        BCSCTL3 &=~ LFXT1OF;
        IFG1 &= ~OFIFG;
        __delay_cycles(2000);
       
    }while(IFG1 & OFIFG);                       //确保低频晶振32768起振
   
    IFG1 = 0;
    //=======================================
    TA0CTL = TASSEL_1 + TAIE ;
    TA0CCR1 = 32000;
    TA0CCTL1 = CCIE;

    TA0CTL |= MC_2;  //continuse  mode
    //========================================
    P3OUT |=  SLEEP  ;
    P3DIR  |= SLEEP   ;
    P3SEL &=~SLEEP  ;
     //======================================

  P3OUT |=  LED  ;
    P3DIR  |= LED   ;
    P3SEL &=~LED  ;

      _EINT();
    while(1);
}


#pragma vector = TIMER0_A1_VECTOR
__interrupt void TA(void)
{
    switch(TA0IV)
    {
    case 0x02:  

          P3OUT ^= LED;
          TA0CCR1 +=30000;

        break;
       
    case 0x04:
        break;
   
    case 0x0A:
        count++;
        if(count == 4)
        {  
             P3OUT &= ~SLEEP  ;
            P3DIR  |= SLEEP   ;
            P3SEL &=~SLEEP  ;
        }
        break;
       
    default: break;
    }
}//================================

ACLK = 32768Hz  TACLK = ACLK;

After  8 senconds ,the LED is still  frashing...  and the current is still in  2mA but not  9uA.

so is there anyone can help explain this? Thanks in advance.

 

 

  • Benny Chen said:
    After  8 senconds ,the LED is still  frashing

    Why shouldn't it? You keep updating TA0CCR1, do not disable the LED output and do not disable TA0CCR0 interrupt. So it keeps flashing. The code for setting P3.SLEEP low should be executed after the fourth Timer overflow, which will happen after 4*65536 ticks. And then again after another 65536*65536 ticks :)

    About the current consumption, i don't know what P3.SLEEP is intended to do. it does not, however, set the MSP itself into sleep. Here you should enter an LPM at the end of main instead of while(1). The 2mA you're seeing are probably consumed by the MSP which is running in circles with 8MHz.

  • HI,there.  Thanks for your answer.

    My code maybe make you misunderstand my point. The chip is not just MSP430G2553 ,it is TPS65835. it 's designed  for 3D Glass.(it contains 4 parts:G2553 /DCDC/ H bridge/Ion Linear Battery Charge module) . In my last post,I mean "SLEEP" isnot  refer to  MSP,neither LPM3 nor LPM4. 

     I can share U the Datasheet of TPS65835(I can't find the datasheet in Ti's Web, a FAE of TI provider me the datasheet and the samples) or you can turn to your co-worker ,

    The datasheet will make U understand me well.  Thanks again.

  • Okay, got the data manual from teh product page. Everything's blurred now.

    Just from a quick glance: the 9µA you're expecting are the quiescent current in sleep mode. However, in active mode it is expected to be <50µA. If you see 2mA, these come from somewhere else and not from the power management core.

    The documentation isn't very consistent. You can interpret different parts differently.

    One interpretation is: the integrated MSP isn't affected by SLEEP. It only controls the PMM unit. The MSP continues running. You can put it into an LPM and wait for an interrupt event.

    Other parts indicate that setting SLEEP low will shut everthing off, including the MSP.

    Then, the code examples in 4.4.1 assign a different meaning to P3.0 (the SLEEP pin):

    P3OUT &= ~BIT0; // Set SLEEP mode signal low; SLEEP Function is disabled
    // P3OUT |= BIT0; // Set SLEEP mode signal high (sleep control via MSP430)

    Here, the SLEEP bit does not trigger the sleep mode, it selects whether the MSP controls sleep mode or not. But does not initiate SLEEP mode. (else the 'sleep fucntion is disabled' code would put the device into sleep instead) Really confusing.

    There's another thing: You use the MSP430G2553 include and project settings. However, I don't find anything that tells which MSP430 is really included (only that it is 2xx family), so maybe you use use the wrong include file and therefore th ewrong addresses for the hardware registers. However, the description of the core and the included datasheet parts indeed look like a copy/paste from the 2553 datasheet.

    Benny Chen said:
    or you can turn to your co-worker

    ??? I don't have one (at least not in the MSP area). I'm a standalone multi-purpose engineer in a small company. Not related to TI (if that's what you thought).

  • Other parts indicate that setting SLEEP low will shut everthing off, including the MSP.

    Then, the code examples in 4.4.1 assign a different meaning to P3.0 (the SLEEP pin):

    P3OUT &= ~BIT0; // Set SLEEP mode signal low; SLEEP Function is disabled
    // P3OUT |= BIT0; // Set SLEEP mode signal high (sleep control via MSP430)

    Here, the SLEEP bit does not trigger the sleep mode, it selects whether the MSP controls sleep mode or not. But does not initiate SLEEP mode. (else the 'sleep fucntion is disabled' code would put the device into sleep instead) Really confusing.

    SLEEP pin can make the device (TPS65835)into sleep mode.however,I use the following means to achieve this fuction sucessful.

    First, init the sleep pin state by enable pulldown resistance.

    Second. enable the pullup resistance.  then delay  10 us ,then reenable pulldown resistance. make a high to low transition.  and the whole device will into

    sleep mode .

    But I don't know how to explain this .

     

    There's another thing: You use the MSP430G2553 include and project settings. However, I don't find anything that tells which MSP430 is really included (only that it is 2xx family), so maybe you use use the wrong include file and therefore th ewrong addresses for the hardware registers. However, the description of the core and the included datasheet parts indeed look like a copy/paste from the 2553 datasheet.

    a TI employee told me the embeded MCU is G2553.

    I don't have one (at least not in the MSP area). I'm a standalone multi-purpose engineer in a small company. Not related to TI (if that's what you thought).

    HaHa.....really appreciate for your warm-heart.

  • Benny Chen said:
    But I don't know how to explain this

    I hadn't taken this from the document, but as you explain it, it makes sense. The second low initiates the sleep mode. Well, would fit the different descriptions of the SLEEP signal.
    If it is working this way, then it seems that the SLEEP funcitonality needs to be enabled by an intial low signal, maybe within a certain timeframe. The MSPs port pins are high-impedance inputs initially, having a maximum leakage current of 50nA that pulls the line high (not really a pullup, but maybe considered one if the opposite side has a similar input). This may be enough to have the SLEEP mode not enabled after startup.

    Anyway, you solved the problem. That's what counts.

    However, I think the whole 'datasheet' looks a bit sewed in a great hurry.

  • The SLEEP signal is related to the power device only and will not put the MSP430 into a low power mode. The SLEEP signal will turn off the voltage supply to the MSP430, effectively putting it into it's lowest power state possible. Internally we have connected this SLEEP, power device pin, to the MSP430 pin P3.0. The functional implementation you are seeing was done for a reason to give flexibility to the function.

    There are three functions of SLEEP/P3.0 that may be used:

    1. By setting the SLEEP/P3.0 pin low on startup, the SWITCH pin on the power device can be used turn off the entire system to achieve 9μA of quiescent current (after the push-button is pressed and the power device returns to the SLEEP state, see Section 2.6.2 Page 18).
    2. If the system has lost communication (IR, RF, or from any host) for some defined time, the SLEEP/P3.0 pin can be asserted high and then low in order to trigger the system shutdown. This does not require a press on the push-button in the system so it is like an auto-shutdown / power saving mode.
    3. If the user requires a different SWITCH pin timing (MSP430 controlling push-button actions and the press time), the MSP430 can set SLEEP/P3.0 to high and the push button switch will not turn the device off until the falling edge of SLEEP/P3.0. The default SWITCH debounce timing in push-button mode is 32ms. By using the MSP430 timer and monitoring the SWITCH pin, the MSP430 can be setup to force SLEEP/P3.0 to low after the desired time has passed. See Section 4.3 of TPS65835 datasheet.

    http://focus.ti.com/docs/prod/folders/print/tps65835.html

    I'd be interested in feedback on this and some elaboration on anything that needs clarification in the datasheet.

    Regards,

    Christopher Johnson

    TI, PMU Systems Engineering

  • Benny Chen said:

    There's another thing: You use the MSP430G2553 include and project settings. However, I don't find anything that tells which MSP430 is really included (only that it is 2xx family), so maybe you use use the wrong include file and therefore th ewrong addresses for the hardware registers. However, the description of the core and the included datasheet parts indeed look like a copy/paste from the 2553 datasheet.

    a TI employee told me the embeded MCU is G2553.

    I have to add that Code Composer support for TPS65835 is coming very soon. It will be supported by a downloadable install package (for free of course) from the TPS65835 product website. It's recommended that you switch to use "TPS65835" in Code Composer once the files are there.

    An application note will also be posted to detail the setup, some example code, and some tests you can perform to make sure everything is running correctly. Sometimes these support files and documents are not all available or posted at the same time but it will be there as soon as possible.

     

    Jens-Michael Gross, Thank you for helping with the previous questions here.

     

    Regards,

    Christopher Johnson

    TI, PMU Systems Engineering

  • thanks Jens-Michael Gross again.

    //=====================================

    1. If the system has lost communication (IR, RF, or from any host) for some defined time, the SLEEP/P3.0 pin can be asserted high and then low in order to trigger the system shutdown. This does not require a press on the push-button in the system so it is like an auto-shutdown / power saving mode.

    Johnson,could you help explain my code post in above :

    why the following code can not tigger the chip shutdown?

    P3OUT  |= SLEEP;

    P3DIR |= SLEEP;

    P3SEL &= ~SLEEP;

    //-----------delay 8 s then -------------------------

    P3OUT  &= ~SLEEP;

    P3DIR |= SLEEP;

    P3SEL &= ~SLEEP;

    Jens-Michael Gross's answer is just his understanging and speculate,could U give a offical explain on this issue,or U can give a effective way to make the system into shutdown mode .

    Thanks.

  • Hi Benny,

    While you are testing the SLEEP function, are you powering at the VIN pin or the BAT pin? If VIN is being used, the device should not shut off from the SLEEP pin. This was done such that the MSP430 can continue to operate and monitor the system when VIN is being used to charge the battery. This also allows MSP430 to control the BST_EN and CHG_EN signals to enable or disable the boost and charger while the device is charging the battery.

    Are you initializing the SLEEP pin to low on start-up? P3OUT  &= ~SLEEP;

    Please try to set SLEEP low on startup and avoid reconfiguring the pins if you don't have to. P3.0/SLEEP only has one function in this device so it should not be necessary to change P3DIR or P3SEL during operation. With 4.2 V on the BAT pin and no voltage on VIN, try this code:

     

    P3DIR |= SLEEP; // Set P3.0 to be an OUTPUT

    P3SEL &= ~SLEEP; // Set P3.0 to GPIO function

    P3OUT  &= ~SLEEP; // Initialize P3.0/SLEEP to low level

    //----delay 1 second JUST FOR TEST, to simulate using glasses

    P3OUT  |= SLEEP; // Set P3.0 to high level, this will activate SLEEP control by MSP430

    //-----------delay 8 s then -------------------------

    P3OUT  &= ~SLEEP; // Set P3.0 to low level, system should shutdown (VLDO discharges to 0 V)


    Regards,

    Christopher Johnson

    TI, PMU Systems Engineering

  • Can U help answer in what way the MSP430 can know the VIN has connect an AC adapter (in Battery charging staus) if I don't want to cost an I/O to detect it?

  • Hi Benny,

    Please check the PMU forum for the response to this question and your other ones. The short answer is that the MSP430 should monitor the VIN voltage with the ADC or the comparator module. You can connect this using a resistor divider between VIN and the GPIO of the MSP430.

    There may be other methods but this is the best one I know of.

    Regards,

    Chris, TI PMU Systems Engineering

**Attention** This is a public forum