Ddr-Z8e - Device DriveR for Z8-Encore
Copyright (C) 2003-2009, Lonfield C&D
Contact: Nils Paulsson
Addr: Engelbrektsgatan 7A, SE-58221, Linkoping, Sweden.
Web : http://ddrz8e.sourceforge.net/
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of
the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301 USA.
DESCRIPTION
This is a device driver package for the Zilog Z8Encore! (r) MCU.
It's a source code only package to be used together with Zilog's
development tools ZDS II (free to download at www.zilog.com).
REVISION HISTORY
2009-12-01 - Version 1.00-RC1 released
2009-11-24 - Version 0.11 released
2009-11-16 - Version 0.10 released
2009-10-20 - Alpha version 0.09 released
2007-03-13 - Initial alpha version uploaded to Sourceforge
WHERE TO START
First, install the package. Then read the comments in the CONFIGURE.H
file in the root directory of the software. Also, check out the sample
directory. Further more there is also an old and not yet finished device
driver reference document in the Documentation directory. You may find
useful information there but be aware that its based on both deprecated
software and hardware (Zilog Encore! 640). USE AT YOUR OWN RISK!!!
INSTALLATION
To install the package, uncompress the zip-at a suitable location.
MODULES
ADC This is a device driver for the built-in A/D converter.
The driver supports configuration, interrupt driven A/D-conversion
as well as polled.
BINARY - Defines binary number representation to be used directly
in code, e.g. b1001 or B0101. The module also has some functions
to rotate and multiply bytes. These functions are inline assembly
code and may or may not work depending on memory model, changes
in inline assembly calling convention etc.
DEBUG - Adds support for debugging. The two main macros are DBG_ASSERT()
and DBG_ASSERT_STATIC(). The former is a generic assert-macro aimed for
user code. The later is used by the device driver code to check that
device drivers receives legal hardware addresses, buffer sizes etc. The
debug module also adds support for catching illegal instructions.
FLASH - Adds support for reading, writing, locking and configuring the
flash memory of the MCU. This code may collide with memory segments
defined in ZDS II version 4.11.0.
I2C - This is an asynchronic interrupt driven device driver for the
built-in I2C-controller. The communication is frame based using user
provided communication buffers.
INTERUPT This is a device driver for the built-in interrupt controller
supporting configuration, priority, enabling/disabling of specific
interrupts.
IO This is the basic IO device driver. Besides DIO it also has
definitions for all hardware port addresses, IO-pin configuration and
setting/getting specific IO-pins. This module is one of the very basic
device driver, thus also used in almost every other device driver module.
REGISTER Defines the data type to be used to address specific hardware
addresses. Both absolute as well as absolute + offset addressing is
supported.
SERIAL Device driver for the built in RS232 controllers. The
communication is asynchronous, interrupt driven and frame based using user
provided communication buffers. The device driver supports individual
configuration (during execution time) of each controller for baud rate,
parity, data bits, flow control (RTS/CTS or no flow control) and
communication time out.
SPI Device driver for the built in SPI-controller. The communication is
asynchronous, interrupt driven and frame based using user provided
communication buffers. The device driver also handles various configuration
aspects of the SPI-controller.
TIMER Device driver for the built in timer controller. The driver
supports configuration and most of the various modes of operation.
TICKER This is an add-on device driver for accurate periodic interrupt
generation. This can e.g. be useful when very specific delays are needed or
as a substitute for time measurement. Besides using the built in timers, the
ticker module can also use the SPI, I2C or one of the RS232 controllers as
time source.
WDT Device driver for the watch dog timer.
GENERAL NOTES
- The source code of every project has to be configured in a CONFIGURE.H file.
A template with all possible options are located in the root directory of the
installed DdrZ8e root directory.
- Compiler warnings (222) about statements having no effect can mostly be
ignored. They generally originate from certain macros, e.g. debug-macros
that end up being empty statements owing to the specific settings of the
configuration in use.
- There are often two versions of a given function or procedure in the device
driver code. The first version is a standard C-function or C-procedure that
provides type checking during compilation and linking. The second version is
an inline macro version without the overhead of a C function call, i.e. smaller
and faster code. Inline versions are intended for release code and the C-calling
versions are for development to facilitate debugging etc. Which version to use
is configured in each project's CONFIGURE.H file (parameter CFG_INLINE_MACRO).
- When using a specific module, e.g. the serial RS232-module, include both the
*.c file and the *_inline.c file. For the serial module that would be "serial.c"
as well as "serial_inline.c". The *.c file provides the device driver code and
the *_inline.c file provide wrapper calls for inline macros (see previous paragraph).
- The sample directory has at least one sample project for each device driver
module. Since ZDS II has a habit of using absolute paths the sample projects
probably have to be updated depending on where the DdrZ8e source code is
installed
NOTES REVISION 1.00-RC1
- This is the 1st release candidate for the 1.00 official release.
- Updated the timer (TMR) module's code and documentation to support ZDS 4.11.0
as well as Zilog Encore! XP 642
- Updated the ticker (TCK) module's code and documentation to support ZDS 4.11.0
as well as Zilog Encore! XP 642
- Updated the text (TXT) module's code and documentation to support ZDS 4.11.0
as well as Zilog Encore! XP 642
- The serial LCD module is officially not supported but the code is still included
in the release.
NOTES REVISION 0.11
- Updated the digital IO module's code and documentation to support ZDS 4.11.0
as well as Zilog Encore XP 642
- Updated the interrupt (IRQ) module's code and documentation to support ZDS 4.11.0
as well as Zilog Encore XP 642
- Updated the serial (RS232) module's code and documentation to support ZDS 4.11.0
as well as Zilog Encore XP 642
- Updated the SPI module's code and documentation to support ZDS 4.11.0 as well
as Zilog Encore XP 642
- Fixed a problem with overlapping segments for flash option bits
- Updated the watchdog timer (WDT) module's code and documentation to support
ZDS 4.11.0 as well as Zilog Encore XP 642
NOTES REVISION 0.10
- Updated and cleaned up modules ADC, BINARY, DEBUG, FLASH and I2C to be
compatible with Zilog Encore XP 642 and ZDS II 4.11.0.
- Brought the documentation for modules ADC, BINARY, DEBUG, FLASH and I2C up to date
- Updated documentation for overall module description and software configuration
(chapters 1 - 4).
- Fixed a signed/unsigned bug in the TEXT module.
- Clean up the config.h files in samples.
- Added documentation about the inline wrapper functions
- Fixed a bug in the inline perl compiler that couldn't handle pointer definitions
NOTES REVISION 0.09
- This release isn't targeted for any specific version of the Zilog development
tool. This is almost exclusively owing to quality and backward compatibility
issues with earlier versions of the Zilog tools. This version of Ddr-Z8e does,
however, build on the ZDS II version 4.11.0. The source code and samples
have been verified to work at some time in history, starting with ZDS II
version 4.6.1 and Encore! 640, but far from all samples have been tested
on the latest versions of software and hardware.
- The ADC-module sample code is old and currently targeted for the Zilog Encore"
640 evaluation board. The device driver may or may not work with the 642/XP family.
- The support for slave mode in the SPI-module has not been tested.