Do not enter Idle mode from the external interrupt 2 handler

isr_ext2() ends with PCON |= 1. On the DW8051 any enabled interrupt request
ends idle, so the handler sleeps until the next request arrives, the system
tick at the latest, and only then returns. Everything at the same priority
waits with it, and the instruction after the idle is RETI, so the sleep buys
nothing.

The handler still clears its flag, which is what it has to do. The other four
uses of PCON |= 1 are in task context and are left alone.
This commit is contained in:
d00f committed 2026-09-08 22:43:05 +02:00
1 parent 6488433584
commit 21a9fdf45a
1 file changed
-1
-1
View File
@@ -516,7 +516,6 @@ void isr_ext1(void) __interrupt(2)
void isr_ext2(void) __interrupt(8) void isr_ext2(void) __interrupt(8)
{ {
EXIF &= 0xef; // Clear IRQ flag (bit 7) in EXIF EXIF &= 0xef; // Clear IRQ flag (bit 7) in EXIF
PCON |= 1; // Enter Idle mode until interrupt occurs
} }
/* /*