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

Not reading IOPIN1 during Timer-Interrupt

My problem is: I cannot read a Pin P1.26 inside a Timer-Interupt.
MCU: LPC2368

// Initialization I/O
IODIR1 =   (1<<4);     // P1.4 Output

Timer Interrupt 100us:
P1.26 is toggling with 150Hz

__irq void T2_IRQHandler(void)
{
  T2IR        = 1;          // Clear interrupt flag
  VICVectAddr = 0;          // Acknowledge Interrupt

  //IOPIN1^=(1<<4);  // this is toggling when enabled

  if(IOPIN1&(1<<26)==0)
  {
    IOPIN1^=(1<<4);  // this NOT
  }

}