The EXTMODE and EXTPOLAR have some serious bugs for all but the latest LPCs. I suggest you look at the errata for the chip you are using. Richard Duits. bell_c_d wrote: > I'm trying to set EXTINT0 to active-high, edge-sensitive (i.e. set > EXTPOLAR and EXTMODE to 1), but am unable to set/read back bit 0 in > either of the registers. FWIW, bit 1 (for EXTINT1) sets/reads back > successfully. > > The code sample below looks correct. Does anyone have any ideas? > > byte b=EXTPOLAR; > E3A0320E mov r3, #0xE0000000 > E283397F add r3, r3, #0x001FC000 > E3A02F53 mov r2, #0x0000014C > E7D33002 ldrb r3, [r3, r2] > E54B300D strb r3, [r11, #-13] > EXTPOLAR = 1; // set EXTINT0 active high > E3A0220E mov r2, #0xE0000000 > E282297F add r2, r2, #0x001FC000 > E3A01F53 mov r1, #0x0000014C > E3A03001 mov r3, #0x00000001 > E7C23001 strb r3, [r2, r1] > b=EXTPOLAR; > E3A0320E mov r3, #0xE0000000 > E283397F add r3, r3, #0x001FC000 > E3A02F53 mov r2, #0x0000014C > E7D33002 ldrb r3, [r3, r2] > E54B300D strb r3, [r11, #-13] > b=EXTMODE; > E3A0320E mov r3, #0xE0000000 > E283397F add r3, r3, #0x001FC000 > E3A02F52 mov r2, #0x00000148 > E7D33002 ldrb r3, [r3, r2] > E54B300D strb r3, [r11, #-13] > EXTMODE = 1; // set EXTINT0 edge-sensitive > E3A0220E mov r2, #0xE0000000 > E282297F add r2, r2, #0x001FC000 > E3A01F52 mov r1, #0x00000148 > E3A03001 mov r3, #0x00000001 > E7C23001 strb r3, [r2, r1] > b=EXTMODE; > E3A0320E mov r3, #0xE0000000 > E283397F add r3, r3, #0x001FC000 > E3A02F52 mov r2, #0x00000148 > E7D33002 ldrb r3, [r3, r2] > E54B300D strb r3, [r11, #-13] > > > > > > > ------------------------------------------------------------------------ > YAHOO! GROUPS LINKS > > * Visit your group "lpc2000 > <http://groups.yahoo.com/group/lpc2000>" on the web. > > * To unsubscribe from this group, send an email to: > lpc2000-unsubscribe@yahoogroups.com > <mailto:lpc2000-unsubscribe@yahoogroups.com?subject=Unsubscribe> > > * Your use of Yahoo! Groups is subject to the Yahoo! Terms of > Service <http://docs.yahoo.com/info/terms/>. > > > ------------------------------------------------------------------------ >
Message
Re: [lpc2000] Setting EXTPOLAR and EXTMODE bit 0
2005-10-18 by Richard Duits
Attachments
- No local attachments were found for this message.