warp9 schrieb:
> Heißt dass, wenn ich TCON.5 (TF0) setze während TCON.5 (TF0) bereits
> gesetzt ist, sollte er sofort die ISR anspringen?
Nach allen Zugriffen auf die Interruptlogik erfolgt erst noch ein Befehl
des aktuellen Tasklevels. Das kann das Main sein oder ein Interrupt
niederer Priorität. Das ist notwendig, da die Polling-Sequenz verworfen
und neu ausgeführt werden muß.
"How Interrupts Are Handled
The interrupt flags are sampled at S5P2 of every machine cycle. The
samples are polled during the following machine cycle. If one of the
flags was in a set condition at S5P2 of the preceding cycle, the polling
cycle will find it and the interrupt system will generate an LCALL to
the appropriate service routine, provided this hardware-generated LCALL
is not blocked by any of the following conditions:
1. An interrupt of equal or higher priority level is already in
progress.
2. The current (polling) cycle is not the final cycle in the execution
of the instruction in progress.
3. The instruction in progress is RETI or any write to the IE or IP
registers.
Any of these three conditions will block the generation of the LCALL to
the interrupt service routine. Condition 2 ensures that the instruction
in progress will be completed before vectoring to any service routine.
Condition 3 ensures that if the instruction in progress is RETI or any
access to IE or IP, then at least one more instruction will be executed
before any interrupt is vectored to. The polling cycle is repeated with
each machine cycle, and the values polled are the values that were
present at S5P2 of the previous machine cycle. Note that if an interrupt
flag is active but not being responded to for one of the above
conditions, if the flag is not still active when the blocking condition
is removed, the denied interrupt will not be serviced. In other words,
the fact that the interrupt flag was once active but not serviced is not
remembered. Every polling cycle is new."
Ich habe bisher nur echte 8051 (Philips, Atmel, Siemens, Intel)
verwendet. Der Soft-Core könnte fehlerhaft sein.