Skip to main content
Visitor II
October 23, 2003
Question

ST7FLITE29, PWM out stays HIGH in HALT - mode

  • October 23, 2003
  • 2 replies
  • 609 views
Posted on October 23, 2003 at 04:06

ST7FLITE29, PWM out stays HIGH in HALT - mode

    This topic has been closed for replies.

    2 replies

    delser9Author
    Visitor II
    October 14, 2003
    Posted on October 14, 2003 at 06:10

    In order to save energy in the battery during 'stand-by' we use the HALT mode of the ST7FLITE29.

    It seems to work correctly and the current consumption is really very much reduced. But very often, the PWM2 output goes HIGH after the HALT instruction. That must be avoided in the application.

    The stand-by routine in C is:

    ClearBit(PWMCR,TWO) // Disable PWM1

    ..

    relay_off(); // Turn all outputs OFF

    ..

    ClearBit(PWMCR,FOUR); // Disable PWM2

    ClearBit(PADR,FOUR); // Reset PA4 (=PWM2) (not necessary)

    WDGCR|=0x7F; // watchdog set

    ClearBit(LTCSR1,TB1IE); // active HALT disabled

    ClearBit(ATCSR,OVFIE); // ''

    ClearBit(PADR,FOUR); // to be sure, that the output is LOW in HALT

    (should not be necessary)

    Halt; // HALT instruction

    Several times, the PWM2 (=PA4) output is set LOW. Does anybody have any idea, why it still stays HIGH in HALT mode? We do have the problem only with the PWM2 and not with PWM1, although they are connected electrically in the same way.

    Thank you all for help!
    delser9Author
    Visitor II
    October 23, 2003
    Posted on October 23, 2003 at 04:06

    If we add a delay of one second between stopping the PWM and the HALT command it works correctly. The PWM output stays LOW during HALT.

    But why? Anybody an idea?

    Thank you for any hints!