Skip to main content
Visitor II
April 3, 2006
Question

Restart ST7 after unplugging power supply

  • April 3, 2006
  • 15 replies
  • 2687 views
Posted on April 03, 2006 at 15:39

Restart ST7 after unplugging power supply

    This topic has been closed for replies.

    15 replies

    Visitor II
    March 3, 2006
    Posted on March 03, 2006 at 10:58

    Hello world,

    I would like to restart (automatically or with a button) my ST7 atfer a power supply break down and without using the indart card. How can I do that ?

    Thanks.

    Philippe

    Visitor II
    March 6, 2006
    Posted on March 06, 2006 at 04:54

    Hi Orlando,

    Maybe you can monitor the power supply voltage of your board and generate a self reset of the MCU at power shut down.

    Akotronic

    Visitor II
    March 6, 2006
    Posted on March 06, 2006 at 18:02

    Hi,

    When I push the reset button, the program stops but doesn't restart : so I'm not sure that generating a self reset will work. What I need is to make a restart, maybe I do not understand how the reset really works, but can I use it to make a restart and if so how can I do that?

    Thanks.

    Visitor II
    March 7, 2006
    Posted on March 07, 2006 at 04:25

    Hi all,

    Normally, if the reset button is connected to reset pin of your microcontroller, when you push the reset button the programm will stop and then restart when you release the button. In your programm, the reset interrupt vector has to point at the begining of you code.

    What is the behavior of Vdd voltage when you push the reset button ?

    [ This message was edited by: Akotronic on 07-03-2006 08:58 ]

    Visitor II
    March 9, 2006
    Posted on March 09, 2006 at 10:55

    Hi,

    The reset button links the reset pin to the ground when I push it, but when I release it it is not linked to anything. I do not know the behavior of Vdd voltage when you push the reset button.

    Could you tell me how to make the reset interrupt vector to point at the beginning of my code? (I'm using Cosmic C Compiler).

    thanks

    Visitor II
    March 9, 2006
    Posted on March 09, 2006 at 11:21

    Hi,

    If your are using LVD function, RESET pin is configured as output so your reset button wil have no effect. So, I think your are not using LVD and you need an external reset circuit (pull up resistor and capacitor to ground) connected to the reset pin (see datasheet for exact values). In fact, when you release the reset button, the reset pin have to return to +Vdd voltage.

    Sorry, but I don't use C compiler. I only programm in assembler.

    [ This message was edited by: Akotronic on 09-03-2006 15:55 ]

    Visitor II
    March 9, 2006
    Posted on March 09, 2006 at 11:38

    Quote:

    Could you tell me how to make the reset interrupt vector to point at the beginning of my code? (I'm using Cosmic C Compiler).

    In your interrupt vectors (file vector.c in the example provided with the compiler), you will find a table like this:

    void (* const _vectab[])() = {

    NULL, /* unused */

    NULL, /* SPI */

    NULL, /* LITE TIMER RTC */

    NULL, /* LITE TIMER Input Compare */

    it_tovf, /* AT TIMER Overflow */

    it_tcmp, /* AT TIMER Output Compare */

    NULL, /* AVD */

    NULL, /* unused */

    NULL, /* unused */

    NULL, /* External Interrupt 3 */

    NULL, /* External Interrupt 2 */

    NULL, /* External Interrupt 1 */

    NULL, /* External Interrupt 0 */

    NULL, /* unused */

    NULL, /* TRAP */

    _stext, /* RESET */

    };

    the last line ''tells'' the micro to jump to label _stext when a reset occurs.

    This label is defined in the startup file crts.s; if you look at it, you will see code for some initializations and then a jump to main().

    If your application works ok in the debugger, your problem is *likely* not here.

    Regards,

    Luca (Cosmic)

    Visitor II
    March 13, 2006
    Posted on March 13, 2006 at 05:55

    Hello,

    In help Visual Debbug I read :

    ''Run : Resets the microcontroller and executes the application.''

    So normally as Luca said the soft must run.

    So I think that my card has a problem.

    My reset button is designed with the following manner:

    ground -> reset button -> R=1K -> pin reset

    Is it false or true?

    And is there any other possibility of error?

    Thanks

    [ This message was edited by: Orlando on 13-03-2006 10:32 ]

    Visitor II
    March 15, 2006
    Posted on March 15, 2006 at 05:21

    Nobody can help me?

    :-[

    Visitor II
    March 15, 2006
    Posted on March 15, 2006 at 05:42

    Hi.

    Before i used indart softec debugger and i had no problems with reset. now i am using rlink from raisonance, and what amazing is: micro does not do self-reset after power on if rlink connected to the board.

    Try to unplug your debugger.

    And read the following post, may be it will help you:

    http://mcu.st.com/mcu/modules.php?mop=modload&name=Splatt_Forums&file=viewtopic&topic=3719&forum=1