mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
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:
1 parent
6488433584
commit
21a9fdf45a
1 file changed
-1
@@ -516,7 +516,6 @@ void isr_ext1(void) __interrupt(2)
|
||||
void isr_ext2(void) __interrupt(8)
|
||||
{
|
||||
EXIF &= 0xef; // Clear IRQ flag (bit 7) in EXIF
|
||||
PCON |= 1; // Enter Idle mode until interrupt occurs
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in new issue
Block a user