
UM007518-1211
26
Zilog Real-Time Kernel: eZ80
®
CPU
User Manual
Q: I have two devices, TIMER1 and UART1. I don't want to miss the Interrupts of either
device and want to handle both of them. How can I do it using RZK? Is it possible to get
nested interrupts in RZK? If so, what precautions do I need to take so that nothing goes
wrong?
A: First, install the interrupt handler for both the devices and then initialize the devices.
RZK is designed to support nested interrupts for different devices. To include nested inter-
rupts, make sure you have enabled the interrupts after the
RZKIsrProlog() API is called
in the ISR. Take the precaution to include enough time to service the interrupt and to exe-
cute the thread code. If an interrupt routine needs to be nested, it is usually because there
are bursts of interrupts that have to be handled. A large buffer for the incoming data and a
larger stack size is also required.
Q: I regularly get an Uninitialized Interrupt message. What does this message
mean and why do I get it?
A: The message Uninitialized Interrupt specifies that one of your interrupt han-
dlers has not been initialized using
RZKInstallInterruptHandler() API. By default,
RZK installs a handler that prints the message
Uninitialized Interrupt and exe-
cutes a
HALT instruction.
Q: Why does the control not go to the highest priority thread, when I create it within the
main() API?
A: The main() function executes at the highest priority. It acts as a launch pad for the
application. The control is transferred to your application only after the
main() function
is executed completely. Although, you have assigned the highest priority to the thread that
you have created, make sure to select the
RZK_THREAD_AUTOSTART option for the opera-
tion mode of the thread. Otherwise, you must explicitly resume the thread by calling
RZKResumeThread() API.
Q: Do the binary semaphores, used for mutual exclusion, allow multiple locking by a
thread?
A: No. Binary semaphores are for mutual exclusion only and multiple locking by the
same thread is not allowed in RZK.
Q: Does RZK support callback functions, such as callouts in pSOS and hookups in
VxWorks?
A: Yes. However, the support is limited to the cleanup functions that are called when a
thread is deleted.
Comentarios a estos manuales