Zilog Z8F0130 User Manual
Page 437
UM013037-1212
Appendix A. Zilog Standard Library Notes and Tips
Zilog Developer Studio II – Z8 Encore!
User Manual
413
I am using the UART in the interrupt mode. Why do I seem to lose
some of the data when I try to print or try to receive a large amount of
data?
One of the reasons could be that the software FIFO buffer size is small. Try increasing the
size to a bigger value. The default size of the software FIFO is 64. The software FIFO size
is defined in the
zsldevinit.asm
file as the BUFF_SIZE macro.
When I call open_UARTx() function by configuring it in INTERRUPT
mode, the control never comes back to my program and my program
behaves indifferently. Why is this?
The
open_UARTx()
function calls the
control_UARTx()
function, which enables the
UART interrupt. As a result of this, the UARTx transmit empty interrupt is generated
immediately. If the ISR for UART is not installed, the control on the program can be lost.
So install the ISR before calling
open_UARTx()
in the INTERRUPT mode. This is not a
problem when the standard boot module is used.
Where can I find sample applications that demonstrate the use of
ZSL?
The ZDS II installation includes two different directories called Applications and Samples.
In both of these directories, all projects using devices supported by ZSL are configured to
use it. The main difference between the directories is that the applications demonstrate the
use of direct ZSL APIs, and the samples demonstrate the indirect use of ZSL using RTL
calls.
I have used init_uart() and other functions provided in the RTL. Do I
need to change my source code because of ZSL?
No. The
sio.c
file of RTL has been modified to call ZSL APIs, so you can continue to
use the run-time library (RTL) without changing your source code. But Zilog advises you
to change your source code to make direct calls to ZSL. This is recommended for the fol-
lowing reasons:
•
The calls in RTL support only one UART (UART0 or UART1) at any given time in
the library. You cannot switch between the UARTs dynamically.
•
There is a small code size increase in the RTL due to the additional overhead of call-
ing ZSL APIs from
sio.c
.
•
Future releases of RTL might or might not continue to support this method of indi-
rectly accessing the UARTs via ZSL.
- Z8F0131 Z8F0230 Z8F0231 Z8F0430 Z8F0431 Z8F043A Z8F0830 Z8F0831 Z8F083A Z8F1232 Z8F1233 Z8F0113 Z8F011A Z8F0123 Z8F012A Z8F0213 Z8F021A Z8F0223 Z8F022A Z8F0411 Z8F0412 Z8F0413 Z8F041A Z8F0421 Z8F0422 Z8F0423 Z8F042A Z8F0811 Z8F0812 Z8F0813 Z8F081A Z8F0821 Z8F0822 Z8F0823 Z8F082A Z8F0880 Z8F1621 Z8F1622 Z8F1680 Z8F1681 Z8F1682 Z8F2421 Z8F2422 Z8F2480 Z8F3221 Z8F3222 Z8F3281 Z8F3282 Z8F4821 Z8F4822 Z8F4823 Z8F6081 Z8F6082 Z8F6421 Z8F6422 Z8F6423 Z8F6481 Z8F6482 Z8FS021A ZMOT1AHH Z8FS040B ZMOT0BHH ZMOT0BSB Z8FMC04 Z8FMC08 Z8FMC16