Volksmikro

Hubert Högl, < Hubert.Hoegl@fh-augsburg.de >
Revision 0.6

Source: proj/volksmikro/concept/concept.tex

Contents

1  Requirements
2  Design of the VM Board
    2.1  FT2232
    2.2  FPGA
    2.3  RS-232 Interface
    2.4  AVR Mega32
    2.5  JTAG Header (20-pin)
    2.6  Voltage Regulators
    2.7  Reset Logic
    2.8  The ARM7 Module
3  More Information
A  Philips ARM7TDMI-S Controller
    A.1  LPC2129
    A.2  LPC2290
    A.3  LPC2292
B  Commercial Boards using the LPC2xxx
    B.1  TinyARM
    B.2  Olimex LPC-H2129
    B.3  Phytec
    B.4  Tiniarm and Usbstamp by MPELTD
    B.5  Burntec TinyARM
    B.6  Armkey

1  Requirements

Here are a few requirements for the future Volksmikro Board:

2  Design of the VM Board

Fig. 1 shows my first attempt (Summer 2003) to define the components which would be nice to have on the Volksmikro board. As you see, I wanted to have all components on a single board. Connectors on both sides with high pin-counts should make the MCU expansion bus available in the target system.
img/board.jpg
Fig. 1: [img/board.jpg]

Currently I dropped the idea to have all parts on a single board. I now much more like the idea to have a universal base board which can be combined with a variety of controller modules. The infrastructure of the base board can thus be reused also for other projects. An attempt to define the components on the base board can be seen in figure 2.

img/vm-kit.jpg
Fig. 2: [img/vm-kit.jpg]

Following are some ideas for the base board (a nice nickname would be ,,USBLab''):

2005-02-12
img/vmschema.png
Fig. 3: [img/vmschema.fig]
The following board configurations come to my mind:
  1. FT2232 / Acex / Acex Expansion Connector
    The board can be used for experiments with the Acex FPGA.
  2. FT2232 / Acex / Mega32 AVR
    The board can be used for experiments with the Atmel AVR and the Acex FPGA. The AVR is able to access the MMC card. Debugging of the AVR can be accomplished with an external JTAGICE, or by controlling the AVR JTAG port with the FT2232 (Channel-A, MPSSE). Serial port data can be accessed over USB.
  3. FT2232 / Acex / ARM Module
    The ARM Module is fully accessable over the USB port. JTAG debugging is possible over FT2232/Channel-A. Boot data (UART0) can be provided over USB Channel-B. UART1 can be routed to the DSub-9 connector to connect to a PC terminal program.
  4. FT2232 / Acex / Mega32 AVR / ARM Module
    The AVR drives UART0 of the LPC2292 for booting. The AVR reads boot data from the MMC card.

2.1  FT2232

Both channels A and B are connected to the FPGA. Channel A will mainly be used as a fast synchronous serial interface for JTAG and SPI. Channel B will be used as an asynchronous serial interface (RS-232).
Our goal is to be able to support the following operations over one USB connection:
  1. Power supply
  2. Reset the AVR and ARM7 targets
  3. Configure the FPGA
  4. AVR serial programming (MISO, MOSI, SCK)
  5. Drive the UART port of the AVR
  6. Drive the UART port of the ARM7 (console)
  7. Drive the UART0 port of the ARM7 (booting)
  8. Drive the JTAG debug port of the ARM7 for programming and debugging
  9. Drive the JTAG debug port of the AVR for programming and debugging
  10. Adjust the voltage regulators
  11. Adjust the FPGA clock generator (e.g. DS1073, CY22150 or CY22393)
  12. JTAG/Boundary Scan for the FPGA

2.2  FPGA

We will use an Altera Acex EP1K10-100/TQFP100. This device is also part of the FTDIchip ,,Morph'' Board.
XXX To Do
- Need a programmable clock generator, e.g. the DS1073 or the Cypres CY22150. The Dallas device is programmable by a single I/O pin whereas the Cypress device has an I2C interface.
        DS1073                        CY22150

  I/O   1    8 VCC              XIN  1    16  XOUT
  OUT0  2    7 XTAL             VDD  2    15  CLK6
  VCC   3    6 OE              AVDD  3    14  CLK5
  GND   4    5 /PDN/SELX       SDAT  4    13  VSS
                               AVSS  5    12  LCLK4
                               VSSL  6    11  VDDL
                              LCLK1  7    10  SCLK
                              LCLK2  8     9  LCLK3

- The Altera Acex is configured in passive serial mode (,,PS''), MSEL0 and MSEL1 are held low.
- The configuration bitstream for the Acex EP1K10 is 159160 bits large, which are 19895 bytes.
- Also add an enhanced configuration device EPC1 or EPC2 to configure the FPGA without a USB connection.
                        nCS   1   8  VCC
   serial data output   DATA  2   7  VCC
                        VCC   3   6  DCLK serial clock
                        GND   4   5  ASDI active serial data input

    Config Mem  ---- FPGA

    DATA             DATA0
    DCLK             DCLK
    ASDI             ASDO
    nCS              nCS0


The Morph board utilizes PS mode driven by FT2232 for configuring the FPGA. I think it is better to use the JTAG mode driven by the FT2232. It should also be possible to configure the FPGA over a serial configuration device (see fig. 4). The configuration device shall be programmed by the Altera download cable.
img/acex-config.jpg
Fig. 4: Image taken from Altera Configuration Handbook, Chapter 4. [img/acex-config.jpg]
XXX To do: read SRunner: An Embedded Solution for Serial Configuration Device Programming White Paper and source code from Altera page.
- Programmable FPGA clock generator vs. fixed frequency. A DS1073 could be used for this job.
- How to combine configuration and JTAG. Note that the TQFP100 package doesn't have a TRST signal (tap reset).
- FPGA I/O voltage and target voltage of Mega32 and ARM7 must match. This will probably be 3.3 Volt.

2.3  RS-232 Interface

XXX To Do

2.4  AVR Mega32

XXX To Do
The JTAGICE connector is shown in figure 5.
img/avriceconn.jpg
Fig. 5: [img/avriceconn.fig]
The new JTAGICE mkII features the debugWIRE single-line debug interface. The devices with a debugWIRE interface have a 6-pin target connector ,,ISP6PIN'':
     MISO   1   2   VCC
     SCK    3   4   MOSI
     RESET  5   6   GND

These devices do not have a JTAG interface. The debugWIRE signal is connected to RESET pin of the AVR device. The following devices currently (2005-02-12) have debugWire: ATtiny13, ATtiny2313, ATmega48, ATmega88, ATmega168. All other JTAG-enabled devices like the ATmega16/32/64/128, ATmega162, ATmega169, ATmega323 have a 10-pin target header compatible to the old (mkI) JTAGICE.
Lit.: JTAGICE mkII Quick Start Guide (4 pages).

2.5  JTAG Header (20-pin)

See figure 6.
img/jtagconn.png
Fig. 6: [img/jtagconn.fig]
XXX To Do

2.6  Voltage Regulators

The MC33701 looks promising. It operates with 2.8 to 6 V input voltage and provides two I2C-programmable output voltages, e.g. for core and I/O voltage. Both output voltages range is between 0.8 and 5 V. Additional features are up/down power sequencing, power-on delay, overcurrent protection, reset output, watchdog timer.
XXX To Do

2.7  Reset Logic

MCP120
XXX To Do

2.8  The ARM7 Module

A controller module block diagram featuring the Philips LPC2xxx is shown in figure 7.
img/lpc2xxx-module.jpg
Fig. 7: [img/lpc2xxx-module.jpg]

RAM
In the production environment, most applications can run without external RAM. The internal 16 KByte SRAM should be enough for variables and stack/heap space. The application program will be in internal Flash memory. I do not expect typical applications running on a small operating system like mt, uC/OS-II or eCos to become larger than 256 KByte.
For debugging, the application program has to be run from RAM. Therefore we need at least a 256 KByte SRAM device, better would be a 512 KByte device.
In the case that a large operating system like uClinux is used, we need at least 4 MByte of RAM. Using Static-RAM we would need more than one chip. To save space it would be better to use Dynamic-RAM, but this implies that the controller has a built in (S)DRAM controller, e.g. like the Oki ML67Q4002.
Typical SRAM devices are:

Nonvolatile mass storage
A Multimedia Card (MMC) can be connected to one of the two SPI interfaces. A more intelligent circuit could boot from the MMC card, if the synchronous data from the card are converted to asynchronous data for UART0. The conversion could be done by e.g. a small Atmel AVR controller.
img/mmcswitch.jpg
Fig. 11: Figure (a) adds a MMC card to the SPI interface. In figure (b) it is possible to access the MMC card as in (a), but moreover it allows to boot the LPC2xxx from the MMC card. The possible SWITCH datapaths are X1-B (boot from UART0), X2-W (R/W from/to MMC) and X1-W (boot from MMC).

Download and Debugging


Connecting the Host PC via serial port

The LPC2290 features a serial boot-loader (ISP - ,,In System Programming'') using UART0 which can be used for in-system download to RAM, flash programming and other useful tasks. The commands are sent in ASCII coding, following is the ISP command table:
Unlock
Set Baud Rate
Echo 
Write to RAM
Read Memory
Prepare sector(s) for write operation (+)
Copy RAM to Flash (+)
Go
Erase sector(s)  (+)
Blank check sector(s)  (+)
Read Part ID   (+)
Read Boot code version   (+)
Compare   (+)

Some of the commands can be called from within the application (IAP - ,,In Application Programming''). See the above commands marked with (+).
Booting can also be accomplished with the boot monitor RedBoot which is part of the eCos operating system. RedBoot is an open-source software package and is used to boot lots of embedded systems. It is ported to many different controller types and comprises a powerful monitor program and a gdb remote-stub implementation.


Connecting the Host PC via JTAG

I would like to have two types of connectivity for the ARM7TDMI JTAG port.
Fig. 12 shows the 20-pin JTAG connector.
img/jtagconn.png
Fig. 12: The 20-pin JTAG connector.
There are different ways how to control the JTAG signals of the ARM7TDMI. At least the following come to my mind:

Operating Systems
All of the following real time operating systems are freely available under an open source license:
Be aware that the above RTOSes are rather small - except uClinux. For uClinux a minimum amount of 4 to 8 MByte of external (D)RAM is necessary. For all others a 128 kbyte to 512 kbyte memory (SRAM) are sufficient.

Development Tools
All development tools are available both for Linux and MS-Windows. They can be downloaded from the GNUARM Website, http://www.gnuarm.com.
Another source for the GNU Toolchain is http://www.macraigor.com/full_gnu.htm.

3  More Information

- Philips Semiconductor Homepage
http://www.semiconductors.philips.com
- Philips MCU discussion forum
http://forums.semiconductors.philips.com/forums/viewforum.php?f=1
- ARMuC Wiki
http://www.open-research.org.uk/ARMuC/
- LPC2XXX Yahoo Newsgroup
http://groups.yahoo.com/group/lpc2000/
- Heyrick's ARM Assembler Tutorial (Richard Murray)
http://www.heyrick.co.uk/assembler
- ARM code tutorial
http://www.soup-kitchen.net/armcode/
- LPC210x ARM7 Microcontroller Tutorial (enz-at-dreamislife-dot-com)
http://www.dreamislife.com/arm/
- GBA Assembler Tutorial
http://www.robsite.de/daten/tutorials/devgba/gba_asm1.html
- Leon Heller's LPC210x Prototyping System
http://www.geocities.com/leon_heller/lpc2104.html
- Peter Y. K. Cheung, Introduction to Computer Systems (Imperial College, London)
http://www.ee.ic.ac.uk/pcheung/teaching/ee2_computing/
- Newsgroup
comp.sys.arm
- Information about Philips LPC21xx ARM Microcontrollers
http://www.lpc2100.com/
- LPCTools
http://www.lpctools.com/
- Micrium Application Note AN-1229, ,,uC/OS-II and The Philips LPC2000 Series CPU'', 13 pages (AN-1229.zip). Darin ist enthalten: Micrium Application Note AN-1011A, ,,uC/OS-II and The ARM7 Processor'', 28 pages.
- Amitkumar Bhojraj, Philips Application Note AN10256, Using In-Application Programming (IAP) techniques for programming the on-chip Flash, 6 pages, 2003-12-12.
- Bill Gatliff, Getting Started With GNU (for ARM Evaluator-7T, but can also be applied to Philips ARM)
http://billgatliff.com/articles/gnu-cci/
- Newmicros USB to JTAG Cable, http://www.mpeltd.demon.co.uk/usbstamp.htm. Contains the components LPC2106, 24C512 EEPROM, XC2C32/64 to drive the JTAG Port connected to the target system, FT245 with AT93C64A, MAX3222. Schematic available. [April 2004]
- http://arm.web7days.com
- ARM Instruction Set Quick Reference Card. XXX add link.
- LPC2290 datasheet (no internal Flash, external bus interface, 2 x CAN) local: ../philips/LPC2290-01.pdf

Literature for the ARM7TDMI core

- ARM7TDMI Product Overview, Arm Limited, 16 pages, ../arm/DVI0027B_7_R3.pdf
- ARM7TDMI (Rev. 4) Technical Reference Manual, Arm Limited, 2001, 294 Seiten, ../arm/DDI0210B_7TDMI_R4.pdf
- ARM Architecture Reference Manual, Arm Limited, 811 pages, ../arm/DDI0100E_ARM_ARM.pdf
- Instruction Set Quick References ../arm/QRC_ARM.pdf and ../arm/QRC_Thumb.pdf
- ARM7TDMI Debug Architecture, Arm Limited, 30 pages, ../arm/DAI0028A_arm7tdmi_debug.pdf

Literature for the Oki ML67Q4002 ARM7TDMI controller

- Oki uPlat Flyer about ARM-Based 32-Bit Controllers, 8 pages, local: ../oki/Oki-Flyer.pdf
- Overview for the ML674K series, 19 pages, February 2004, local: ../oki/674001DS-06.pdf
- 67Q4001/2/3 Overview, 24 pages, local: ../oki/ml674001_q4002_q4003.pdf
- ML674001/Q4002/Q4003 User's Manual, January 31 2004, 440 pages, local: ../oki/ML674001_Q4002_Q4003_Users_Manual.pdf
- Interfacing the ML87V3104 QVGA to SVGA LCD Controller and the ML674000 Microcontroller, August 2003, 19 pages, local: ../oki/armappnotelcd.pdf
- Oki Application Note JTAG Boundary Scan for 0.8 um and 0.5 um SOG and CSA Technologies, April 1995, 40 pages, local: ../oki/JTAG-Boundary-Scan.pdf

A  Philips ARM7TDMI-S Controller

In June 2004 the most promising 32-bit processor with an ARM core to replace a 8- or 16-bit controller like the 68HC11 seems to be the Philips LPC2xxx series. The LPC2129 and LPC2290 each have two built in CAN interfaces, the first is without external bus interface (EBI), the second with EBI.
The LPC2129 would be ideal as a processor for productive use. When choosing an operating system as small as uC/OS or eCos, the built-in 256 kbyte Flash memory would be enough for small control applications. For use as a development system this processor is not ideal, because for every software test the internal Flash has to be reprogrammed.
For a development system the LPC2290 is a better choice. Programs to be tested can be run and debugged from an externally added SRAM with 512 KByte size.
The generic features of the LPC2129/LPC2290 are:
img/lpcprod1.jpg
Fig. 13: Philips LPCxxxx products (part 1)
img/lpcprod2.jpg
Fig. 14: Philips LPCxxxx products (part 2)

A.1  LPC2129

This device is without an external bus interface.
img/lpc2129-block.jpg
Fig. 15: LPC2129 Block Diagram
img/lpc2129-pins.jpg
Fig. 16: LPC2129 Pins

A.2  LPC2290

This device has an external bus interface. The data bus is 32-bit wide and mapped on Port 2 (P2.0 - P2.31). The address bus is capable to address four banks with a maximum of 16 mbyte in each bank. The address signal A0 - A23 are on Port 3 P3.0 - P3.23. The chip select signals are on P1.0 (CS0), P3.26 (CS1), P3.25 (CS2) and PC.24 (CS3). Each bank may be 8/16/32 bits wide. Fig. 17 shows the block diagram of the LPC2290.
img/lpc2290-block.jpg
Fig. 17: LPC2290 Block Diagram
The pinout of the LPC2290 is shown in figure 18.
img/lpc2290-pins.jpg
Fig. 18: LPC2290 Pins

A.3  LPC2292

img/lpc2292-block.jpg
Fig. 19: LPC2292 Block Diagram
The pinout of the LPC2292 is shown in figure 20.
img/lpc2292-pins.jpg
Fig. 20: LPC2292 Pins

B  Commercial Boards using the LPC2xxx

B.1  TinyARM

The TinyARM can be ordered from the Elektronikladen, http://www.elektronikladen.de. See figures 21 and 22.
img/tinyarmdip50.jpg
Fig. 21: TinyARM Schematic
img/tinyarm1.jpg
Fig. 22: TinyARM PCB

B.2  Olimex LPC-H2129

URL: http://www.olimex.com/dev. See figures 23, 24 and 25.
img/olimex-lpc2129.jpg
Fig. 23: Schematic of the Olimex LPC-H2129 Board.
img/olimex-lpc2129-pcb.jpg
Fig. 24: PCB Floor Plan of the Olimex LPC-H2129 Board.
img/olimex-jtag.jpg
Fig. 25: JTAG Connector of the Olimex LPC-H2129 Board.
Features:
The manual mentions that a 14.7456 MHz external crystal leads to non-functioning JTAG interface. Theoretically the external crystal can be 10 - 25 MHz. Therefore had to use a 10 MHz crystal, with the side effect that Philips ISP utility can only run 38400 baud. With 14.7456 MHz can run serial port up to 115 Kbps, but without JTAG use.

B.3  Phytec

The Phytec (http://www.phytec.de) phyCORE-LPC2292/94 is a board with an LPC2292/94 (TQFP-144) and some megabytes of external memory. The main features are 60 x 53 mm, two 100-pin Molex connectors, 1MB to 8 MB asynchronous RAM with 32-bit, 2MB to 16 MB asynchronous Flash with 32-bit, 10/100 MBit Ethernet Controller SMSC LAN91C111 with integrated PHY layer (optional), I2C Real Time Clock with internal quartz (RTC), 1K SPI EEPROM (Atmel AT25080, AT25160, etc.), CAN Transceiver Infineon TLE6250V33, DS2401 Silicon Serial Number, typical Flash Memory is 29LV800B, 29LV160B and 29LV320B (all 3.3V devices), MAX6301 Watchdog, max 60 MHz clock, not data bus buffers on board (but recommended for external hardware).
img/phytec-1.jpg
Fig. 26: Phytec phyCORE-LPC2292/94

B.4  Tiniarm and Usbstamp by MPELTD

This is a small module by Microprocessor Engineering Limited, http://www.mpeltd.demon.co.uk.

img/tiniarm.jpg
Fig. 27: Tiniarm by MPELTD [img/tiniarm.jpg]

img/usbstamp.jpg
Fig. 28: Usbstamp by MPELTD [img/usbstamp.jpg]

B.5  Burntec TinyARM

http://www.burntec.com/tinyarm.asp

B.6  Armkey

ARMKEY V1.00 is a DIL-40 module with LPC2104. They have an eForth to download. See http://www.egenom.com/product.htm.
img/ak100_3.jpg
Fig. 29: Armkey [img/ak100_3.jpg]



File translated from TEX by TTH, version 3.63.
On 13 Feb 2005, 21:47.