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

T3OE/T6OE work on in Bootstrap Mode but not in Flash-Memory

I'm using the frequencies generated by the timers T3 and T6 for driving 2 stepper motors.

The direction of the pins P3^1 and P3^3 equal 1.
T3OE and T6OE equal 1 too.
If timer 3 or timer 6 are generating an IRQ in the bootstrap mode the correspondending pins P3^1 / P3^3 are toggled.
But if i load the program to flash, everything works, but on P3^1 and P3^3 there doesn't change anything.
The program says, that T3OE and T6OE are set to 1, the timers are running, IRQs are working and T3OTL/T6OTL are toggling too.

If I do the transitions on the pins manually:

sbit p_T3 = P3^3;
sbit p_T6 = P3^1;

...

void T3_timer_init()
{
  T3=2000;
  T3CON = 0x0481;
  T3IC = 0x78;      // ILVL=1110 GLVL=00 T3IE=1

}

void T6_timer_init()
{
  T6=300;
  T6CON = 0x0481;
  T6IC = 0x79;      // ILVL=1110 GLVL=01 T3IE=1

}

void interrupt_T3 (void) interrupt (0x23)
{
  p_T3 = ~p_T3;	// toggling P3^3
}

void interrupt_T6 (void) interrupt (0x26)
{
  p_T6 = ~p_T6; // toggling P3^1
}

void main(void)
{
  timer_init();
  IEN=1;
  T3OE=1;
  T6OE=1;
  T3R=1;
  T6R=1;
  while(1);
}

then everything works fine.
Does anyone have an idea why it doesn't work with T3OE=1 and T6OE=1 ?

Thanks for any hints!

Torsten

0