FX2LP Interrupt INT0# not triggering

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
DaWi_3430881
Level 3
Level 3
First like given

Hello,

  I am trying to get the INT0# to trigger on the FX2LP. I can see on an oscope that the external pin, pin 34 on CY7C68016A-56LTXC,  is transitioning from high to low but my isr function does not run. INT1# is held high. Here is the code.

From bulkloop.c

// Port A Configuration

   PORTACFG |= bmINT1 + bmINT0;  // Enable  Interrupts INT0_N (PA0) and INT1_N (PA1)

   SYNCDELAY;

   TCON |= 0x05;                 // INT0 and INT1 are configured as Edge triggered interrupt

   IE   |= 0x85; SYNCDELAY;        // Enable global interrupts and INT0# and INT1#

   OEA   = 0xF4;

From another file.

void keypress_isr (void) __interrupt INT1_VECT

{

   led_color_set(1,0xff,0xff,0xff);

}

Any help would be greatly appreciated.

Thanks,

Dave

0 Likes
1 Solution

Hello Dave,

I was able to reproduce the issue and correct the same.

Please declare the line in the fx2regs.h

__sfr __at (0x92) _XPAGE   ;

after

__sfr __at (0x92) MPAGE   ;

This will properly initialize the XPAGE as per the SDCC user guide.

Please confirm if this resolved the issue.

Thanks,

Yatheesh

View solution in original post

0 Likes
18 Replies