z8f0813 ZiLOG Semiconductor, z8f0813 Datasheet - Page 67

no-image

z8f0813

Manufacturer Part Number
z8f0813
Description
High-performance 8-bit Microcontrollers
Manufacturer
ZiLOG Semiconductor
Datasheet
PS024314-0308
Caution:
Caution:
Caution:
Caution:
Software Interrupt Assertion
Watchdog Timer Interrupt Assertion
Program code generates interrupts directly. Writing a 1 to the correct bit in the Interrupt
Request register triggers an interrupt (assuming that interrupt is enabled). When the inter-
rupt request is acknowledged by the eZ8 CPU, the bit in the Interrupt Request register is
automatically cleared to 0.
The Watchdog Timer interrupt behavior is different from interrupts generated by other
sources. The Watchdog Timer continues to assert an interrupt as long as the timeout condi-
tion continues. As it operates on a different (and usually slower) clock domain than the
rest of the device, the Watchdog Timer continues to assert this interrupt for many system
clocks until the counter rolls over.
To avoid missing interrupts, use the following coding style to clear bits in the Interrupt
Request 0 register:
The following coding style used to generate software interrupts by setting bits in the
Interrupt Request registers is not recommended. All incoming interrupts received
between execution of the first LDX command and the final LDX command are lost.
To avoid missing interrupts, use the following coding style to set bits in the Interrupt
Request registers:
To avoid re-triggerings of the Watchdog Timer interrupt after exiting the associated in-
terrupt service routine, it is recommended that the service routine continues to read from
the RSTSTAT register until the
sample:
CLEARWDT:
LDX r0, RSTSTAT ; read reset status register to clear wdt
BTJNZ 5, r0, CLEARWDT ; loop until bit is cleared
Good coding style that avoids lost interrupt requests:
Poor coding style that can result in lost interrupt requests:
Good coding style that avoids lost interrupt requests:
bit
ANDX IRQ0, MASK
LDX r0, IRQ0
OR r0, MASK
LDX IRQ0, r0
ORX IRQ0, MASK
WDT
bit is cleared as given in the following coding
Z8 Encore! XP
Product Specification
®
Interrupt Controller
F0823 Series
57

Related parts for z8f0813