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.

MSP430 Reset problem

Other Parts Discussed in Thread: MSP430F1611, MSP430F149, TPS3836, LM317, LM117

Hello all,

I a student and working on a project.
The project is very low power circuit.

I am having a problem with interfacing with AT86RF231.

First I will describe a little bit what I am doing.

The input of the circuit is 0.8 V. Then I have installed the rectifier so that I can use dual polarity at the input.
The 0.8 V is increased to 4 Volts by booster.

The 4 V is divided here. One lead goes to the voltage regulator (Max8880) to constant it to 2.7 V. This Voltage power up all the ICs in the Board.

The 4V is also connected to the Super Capacitor to charge it and the charging start according to the programming in MSP430.




Now the Problem is If i turn on the power and increase it to 0.8 V the output stuck at 1.8 V.

If I hold the push button attached to the reset pin of the MSP430 the output voltage start increasing and then reach the 2.7 V at that point if I release the push button the voltage stays at 2.7 V and RF starts working.

And also some time when the output reaches 2.7 V the RF doesnot work and then if i press the reset button it starts working.
I also attached the reset rising edge image in the post.

I try to put the voltage supervisor in the program but it doesn't work out at all. As I put the threshold to 2.5 V the output voltage then stays all the time at 2.5 V and donot increase.



Does anybody have any hint about it...???

Thank you in advance

Regards
Sarmad

5078.TEK00001.TIF

  • i think nobody have any idea about this...!!!!!

  • I think it is very hard to understand what's going on without schematics of your device.

  • Here is the schematic of the micro controller...!!!

  • Sarmad Aslam said:
    If I hold the push button attached to the reset pin of the MSP430 the output voltage start increasing and then reach the 2.7 V

    1. Perhaps you have "short" of logic signals on your board - perhaps two output pins having different states are connected together. Check signal routing and port/pin I/O directions.

    2. Perhaps #1 problem happen because msp power-on does not go as expected. Try to run test using DCO at 1MHz.

  • yup its the power up problem as I am using a Booster and the power goes up slowly...!!!

    I want to run MSP430 with solar power or thermal or something like this.

    Ok leave the push button...!!

    At 1.4 V I got 2.7 V at the output but the RF does not start. I check my charging PWM Port and its working so controller start at that point.

    Now if i press the reset button then the RF starts working.

    Why this happens?
    Any Idea...

  • One More thing I want to add.
    If I do debugging the program run perfectly fine and I receive the data on my PC.

    So the programming is OK it is not an issue.


  • Sarmad Aslam said:

    If I do debugging the program run perfectly fine and I receive the data on my PC.

    So the programming is OK it is not an issue.

    Under debugger works and w/o dont? - This is clear indication that programming IS an issue, your start-up code fails. Which part of "msp power-on does not go as expected" you did not understand? Most probably you run your CPU on 8MHz while VCC is not reached 8MHz-compatible voltage (and maybe SPI ot other peripheral in result is not initialized properly). Did you do test using 1MHz DCO? Please do. Also - read datasheet about capacitor/resistor RC circuit for reset pin. Also - think about waiting for VCC and XTAL stabilization before using XTAL.

  • I used this program from TI that is from the MSP430F1611 database....

    For the DCO

    //******************************************************************************
    //  MSP-FET430P140 Demo - DCOCLK Biased with External Resistor Rosc
    //
    //  Description: Use external resistor on P2.5 as DCO current source. DCOCLK
    //  is used by default as the MCLK source. Mainloop drives a 10 cycle software
    //  loop toggling P1.1. Measure DCOCLK/10 on P1.1. Example also disables XTAL
    //  buffer. Use of external resistor reduces temperature sensitivity of DCOCLK.
    //
    //  DCOCLK = Using default DCO and RSEL values @ 2.85V
    //  022k ~ 5.5MHz
    //  100k ~ 2Mhz
    //  220k ~ 860kHz
    //  470k ~ 400kHz
    //
    //               MSP430F149
    //            -----------------
    //   /|\  /|\|              XIN|-
    //    |    | |                 |
    //    R    --|RST          XOUT|-
    //    |      |                 |
    //    -------|P2.5/ROSC    P1.1|-->DCOCLK/10
    //
    //  M. Buccini
    //  Texas Instruments Inc.
    //  Feb 2005
    //  Built with CCE Version: 3.2.0 and IAR Embedded Workbench Version: 3.21A
    //******************************************************************************

    #include  <msp430x14x.h>

    void main(void)
    {
      WDTCTL = WDTPW + WDTHOLD;                 // Stop WDT
      P1DIR |= 0x02;                            // P1.1 = output direction
      BCSCTL2 |= DCOR;                          // Rosc
      _BIS_SR(OSCOFF);                          // XTAL not used


      while(1)
      {
        P1OUT |= 0x02;
        P1OUT &= ~0x02;
      }
    }

    I got this waveform at the Port 1.1

  • Sarmad Aslam said:
    I used this program from TI

    You are not getting "VCC voltage stuck at 1.8volts" right? So, implement this:

    Sarmad Aslam said:
      BCSCTL2 |= DCOR;                          // Rosc
      _BIS_SR(OSCOFF);                          // XTAL not used

    instead of XTAL oscillator in your code which is working with radio and look what happens.

  • I didn' tlook a tthe schematic, but it is a known fact that the MSP has problems with slowly rising supply voltage.
    At soem point, the BOR will release the MSP for operation. The MSP will start after a short delay. However, it is posible that at this point the supply voltage is still not at the required level, or even drops again a bit once the MSP starts drawing its operating current. This may cause an instant crash.
    If your code rises default CPU speed without first checking for proper voltage, this may also cause an instant (or less isntant) crash.

    For the initial voltag eproblem, y possible solution is a large cpacitor on RST. It keeps RST virtually low while VCC is still rising. (the rising RST elvel on the charging capacitor stays below the rising VCC voltage until VCC stops rising and RST can catch up).
    Another possible solution is an external voltage supervisor.

    If the debugger is attached, the MSP is usually not starting from power-up but is powered all teh time and startign from (debugger-initiated) reset. Just like you with your pushbutton on RST.

  • Today I also used a supply voltage supervisor IC from Texas instrument.

    TPS3836 with Threshold of 2.65 V.

    Without connecting to MSP430 it is working fine.

    But I am getting a pules of 80 Hz at the reset pin of the TPS3836 if I connect it to MSP430.

    I am confused about it.

  • Sarmad Aslam said:

    Without connecting to MSP430 it is working fine.

    But I am getting a pules of 80 Hz at the reset pin of the TPS3836 if I connect it to MSP430.

    Perhaps during msp initialization, your "voltage stuck" phenomena happens causing VCC to drop suddenly and supervisor to go into reset again. Do not try all at once. When you test supervisor - test supervisor without your probably buggy code. Try supervisor with that simple DCO 1MHz test code you have, most probably supervisor will work with it. If yes - then look for bugs in the initialization code.

  • OK I will try this but one thing I want to tell about the voltage supply.

    I am limiting the current of the circuit by applying a 39 Ohm resistor at the beginning after the voltage supply so that it would be equal to my solar device, thermocouple.

    You want to say anything about it ?

  • Sarmad Aslam said:

    I am limiting the current of the circuit by applying a 39 Ohm resistor at the beginning after the voltage supply so that it would be equal to my solar device, thermocouple.

    You want to say anything about it ?

    Definitely. Emulate solar panel using current source that give let's say, 50% of panel short-circuit current and zener that limits voltage to panel open-circuit voltage. You can do this using single LM317 regulator connected like in page 9, "load regulation":

    http://www.ti.com/lit/ds/symlink/lm117.pdf

    Also do not forget about at least 100uF electrolyte capacitor and couple of 0.1 uF caps in parallel to your real or emulated, solar panel.

    What's happening now is: your supply is so weak that it does not withstand transients, current consumption spikes. When your msp starts, it consumes current, in result it's VCC drops below reset treshold, in result reset circuit resets msp. That's why you see 80Hz reset pulses when you use external supervisor. Either make your supply stronger or make your consumption smaller - like run slow clock like 1MHZ DCO at least on start-up or even less as we already discussed.

    Perhaps main problem is just supply and you are not making I/O short - I don't know. If your scope have two inputs - using external supervisor look at both, reset signal and VCC voltage during start-up. It will tell the story. When you look at VCC - see where it is regarding your supervisor treshold.


  • Now I download my old program that just include a low power mode with just simple interrupts from the devices.

    It is working fine with the voltage supervisor.

    And When I test It with a program that include RF Transceiver part the reset pin of the controller shows the pulse waveform. (Attached)

    What to do to solve this transceiver problem. The voltage output from my Step Up converter power the whole board including RF.

    What I think is that RF need a lot of current like 14 mA to start or something and also so send the data.So when I try to start the controller the RF try to start with it in parallel and draw a lot of current and in this way the controller starts and then turn off and then try to start and turns off and If i disconnect the power of the RF the reset become stable.

    But I am seeing a constant voltage of 2.7 V at the scope which is going to all the board.

    Confused a lot...!!!!

  • Sarmad Aslam said:
    program that include RF Transceiver part the reset pin of the controller shows the pulse waveform

    Debug it !!!! Do not try all at once. - Isolate your program parts that works with RF transceiver one by one and find at exactly which moment you are getting VCC drop which cause reset. Right away I suggest you to comment out all RF chip related code but leave corresponding I/O and SPI peripheral initialization. Try if it works. If yes, then add next step so - going step by step you can find the place and think what happens and what you can do to avoid it. That's it!


  • I did some changes in the program and now the RF is running with it.

    Put the PMOS with voltage divider circuit  to power up the RF and enabling it after the controller hardware file initialization.

    But at the initial phase when I am increasing the voltage I see the same pulses and when I reach the 1.8 V with 20 mA then the reset become stable and seeing the data on the PC.

    I think its is the supply voltage issue...!!!

    What do U say ?

  • Sarmad Aslam said:
    I think its is the supply voltage issue...!!!

    Most probably yes. You still emulate your solar cell using resistor? Where's you supercap goes? Why don't you power your RF chip from supercap?!

    You have to check datasheets, user manual of your RF radio, compare it's power requirements to your supply specification. Maybe your radio is not compatible with low power solution you are building? Who knows. Maybe you need bigger capacitors to power radio? Check it! Don't expect I will build your device for you here. We are in msp430 forum and fixing power supply for your RF chip (of 3rd party manufacturer) is out of scope here.

  • Ya I am doing things myself. RF radio is from Atmel and is low power compatible.

    I am not saying that you should build something for me.
    I am just asking to clear out my confusions. Rest I am doing my self.

  • Well, please realize that it's tough to answer not seeng whole picture like schematics of your supply solution, how you actually use your radio, what's consumption of it during various phases of initialization and TX/RX. Also in your responses you fail to address/answer all questions asked, for example I asked about supercapacitor, I asked about resistor as current limiter (which is bad approach BTW).

    To conclude: if your VCC is not stable enough, either make supply stronger using better source or bigger capacitors or make consumption smaller.

  • I checked a lot yesterday and also today....!!!

    Check each and every step of the program...!!!

    As I initialize the timer B port in the hal fie of MSP430 then I am seeing the reset pulses of 80 Hz and if I comment this command

    " P4SEL = TRX_IRQ_BIT | TRX_RF_DIG2_BIT; "

    then my board is working perfectly fine.


    #define TRX_IRQ_PORT            P4IN
    #define TRX_IRQ_BIT             BIT0
    #define TRX_IRQ_DIR_PORT        P4DIR
    #define TRX_IRQ_SEL_PORT        P4SEL

    #define TRX_RF_DIG2_PORT        P4IN
    #define TRX_RF_DIG2_BIT         BIT1
    #define TRX_RF_DIG2_DIR_PORT    P4DIR
    #define TRX_RF_DIG2_SEL_PORT    P4SEL

    P4SEL = TRX_IRQ_BIT | TRX_RF_DIG2_BIT;

  • Can't say anything because not enough info. Please show other P4 registers, especially P4OUT, P4DIR, P4SEL2. If you don't touch them, then put breakpoint on P4SEL = command and read contents of those registers in debugger. Also if you do - please show what you do with Timer_B.

    Both IRQ and DIG are input signals into msp430. So, I wonder why you set anything in P4SEL register! All you need to do is - disconnect pins from timer peripheral, set them as _inputs_, make pin change interrupt on IRQ.

    And yes - RTFM! (Read The F-series Manual of MSP430, especially everything about port functions and peripheral I/O). Do not connect two digital outputs together. BTW this was first what I said to you.

  • Thanks a lot...!!!

    I sort out the problem. It was the RF initialization.

    I put it in a condition that wait until the voltage reach 3.5 V and If voltage is at above 3.5 V then initialize the RF and then read the reset of the program.

    But the supervisory external circuit is required else not working...!!

    Once again Thanks a lot to all of  you for helping me out...!!!

**Attention** This is a public forum