This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

interrupt handling

Hello,

I need some help with the interrupt handling on a C-167 controller. In this case, the timer T3 is started (in Timer Mode) and works.
The period time is about 1s, in this cycle comes the reset from the watchdog.. So, there is no access to the interrupt routine.
See someone my mistake or the missing thing?

Dietmar


....
/* set Timer und Interrupt Register */
DP3_3 = 1;
T3IC = 0x44;
T3 = 0x0;
IEN = 1;
T3CON = 0x0646; /* start */
....



#include <reg167.h> /* special function register 80C167 */


void timer(void) interrupt 0x23 {


P3_2 = !P3_2;

}

Parents
  • Thanks for your response.
    I have done.

    void timer(void) interrupt 0x23 {
    _srvwdt_ ();
    T3CON = 0; /* Timer stop */
    T3 = 0; /* reload */
    T3IR = 0; /* clear interrupt request flaq */
    P3_2 = !P3_2;
    T3CON = 0x0646; /* timer start */
    }

    But, there is the same behavior. Every 1.5s comes the reset..

    Dietmar

Reply
  • Thanks for your response.
    I have done.

    void timer(void) interrupt 0x23 {
    _srvwdt_ ();
    T3CON = 0; /* Timer stop */
    T3 = 0; /* reload */
    T3IR = 0; /* clear interrupt request flaq */
    P3_2 = !P3_2;
    T3CON = 0x0646; /* timer start */
    }

    But, there is the same behavior. Every 1.5s comes the reset..

    Dietmar

Children
No data