At a total loss - LPC2294/EINT2

My board has a CS8900A on CS2 with INTRQ0 connected to EINT2 on an LPC2294. I can memory map the chip, access the registers, and configure it. I read both the product ID/rev (indicating it’s a Rev-E chip) and the default I/O address (0x300 - meaningless in this config). I fully configure it and read back values, and it all looks correct. This means I have it properly set up in BCFG2 - it has a 135ns read cycle and 110ns write, and I use 8/6 wait states. It also means I use its packetpage indirection correctly to get to the config.

But when I go through the code to enable EINT2, the CPU wedges. Not interrupts endlessly, or some such, but positively absolutely just hangs until I reset it!

// External interrupts
#define EXTINT (*((volatile unsigned char*) 0xE01FC140))
#define EXTWAKE (*((volatile unsigned char*) 0xE01FC144))
#define EXTMODE (*((volatile unsigned char*) 0xE01FC148))
#define EXTPOLAR (*((volatile unsigned char*) 0xE01FC14C))

// ...

	_vic.InstallHandler(16, Ethernet::Interrupt);

	_eth0.Initialize();

	PINSEL0 = (PINSEL0 & ~(0b11 << 30)) | (0b10 << 30);
	EXTWAKE = 4;			   // EINT2 wakes from power-down
	EXTPOLAR = 4;			   // Make EINT2 active high (rising edge)
	EXTMODE = 4;			   // Make EINT2 edge triggered
	EXTINT = 4;				   // Clear any stray EINT2 flag
	_vic.ClearPending();
	_vic.EnableChannel(16);

This code is executed with IRQs disabled. After the PINSEL0 setup everything looks perfect - the VIC, PINSEL0, and EXTINT. I can step past the EXTWAKE=4. But when I try to execute EXTPOLAR=4 the CPU hangs. I’ve also tried swapping it with EXTMODE, and it makes no difference which order they’re in. It wedges on EITHER!

PINSEL0 reads out:

(gdb) p/x *(long*)0xe002c000
$10 = 0x80055505

Which means P0.7 (the other EINT2 pin) is used for SSEL and shouldn’t be interfering.

Scoping INTRQ0 (not easy) shows a permanent low once it comes out of _eth0.Initialize().

I’ve worked on other things, polished other code, and punted on this hoping I’d have a sudden aha moment. But I’m still utterly clueless as to why this shouldn’t work and just can’t punt on it any longer… Anyone had the same problem? Any ideas?

This did turn out to be a CPU bug after all. Not sure how I missed it since I checked the errata several times. Writing to either EXTMODE or EXTPOLAR while VPBDIV is set to 1 or 2 will hang the CPU. The workaround is to temporarily set VPBDIV to 0 while configuring EINTs.