cancel
Showing results for 
Search instead for 
Did you mean: 

Restart ST7 after unplugging power supply

philippe_cardi
Associate II
Posted on April 03, 2006 at 15:39

Restart ST7 after unplugging power supply

15 REPLIES 15
philippe_cardi
Associate II
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

y2399
Associate II
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

philippe_cardi
Associate II
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.

y2399
Associate II
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 ]

philippe_cardi
Associate II
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

y2399
Associate II
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 ]

luca239955_st
Associate III
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)

philippe_cardi
Associate II
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 ]

philippe_cardi
Associate II
Posted on March 15, 2006 at 05:21

Nobody can help me?

:-[