summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/main.c b/main.c
index 7310e0f..bc4fa18 100644
--- a/main.c
+++ b/main.c
@@ -97,16 +97,16 @@ int main(void)
break;
case RST_STATE:
- SetBit(P2DIR, IMCH_RSMRST_N);
- ClrBit(P2OUT, IMCH_RSMRST_N);
- Timer2 = 100;
+ ClrBit(P2REN, SYS_RESET_N);
+ SetBit(P2DIR, SYS_RESET_N);
+ ClrBit(P2OUT, SYS_RESET_N);
+ Timer2 = 150;
resetState = RST_WAIT;
break;
case RST_WAIT:
if (Timer2 == 0) {
- ClrBit(P2DIR, IMCH_RSMRST_N);
- SetBit(P2OUT, IMCH_RSMRST_N);
+ SetBit(P2OUT, SYS_RESET_N);
if (SW2State == 0)
resetState = ON_STATE;
}
@@ -130,9 +130,6 @@ int main(void)
if (SW1State || TENSION_EXPIRED)
state = STOP;
if ((P4IN & ATX_PWROK) && TENSION_WAIT(bV2P5 && bVCC3)) {
- SetBit(P2DIR, SYS_RESET_N); //modif jmo 25072012
- ClrBit(P2OUT, SYS_RESET_N); //modif jmo 25072012
-
ClrBit(P1OUT, V1P2_CORE_EN_N);
Timer1 = 30;
state = WAIT_V1P2;
@@ -153,8 +150,7 @@ int main(void)
if (SW1State)
state = STOP;
if (Timer1 < 20) {
- SetBit(P2DIR, IMCH_RSMRST_N);
- ClrBit(P2OUT, IMCH_RSMRST_N);
+ SetBit(P2OUT, IMCH_RSMRST_N);
state = WAIT_V1P8;
}
break;