New Page 1

Introduction

The OKI ML67Q500x is high-performance CMOS 32-bit micro-controller combines the 32-bit ARM7TDMITM core, a RISC CPU developed by Advanced RISC Machines Limited (ARM), with a DMA controller, serial ports, PWM generator, analog-to-digital converter, 16-bit timers, and other peripheral functions on a single LSI. In addition to 32-bit data processing, this LSI includes internal RAM and onboard peripherals that make it ideal for such embedded control applications as PC peripherals and communication terminals. Finally, there is a built-in external memory controller for directly connecting ROM, SRAM, SDRAM, other memory types, and peripheral devices.

The OKI-H5003 Development board is designed to evaluate ML67Q500x processor. It has the following features:

  • SDRAM 16MB (8MB x 16bit) 7.5 ns / 166Mhz (allows to run uclinux)

  • Flash 8MB (4MB x16 bit) 80 ns (enough to store uclinux boot image)

  • SRAM 512KB (256KB x16 bit) 10 ns

  • 7.5 Mhz crystal oscillator (PLL=4 60Mhz)

  • JTAG connector

  • USB-RS232 convertеr

  • status LED

  • RESET supervisor IC and button

  • EXTENSION IDC34 connectors for all uC ports

  • USB-RS232 converter connected to UART0

  • power supply can be from USB port or external

  • power supply LED

  • 8 position slide switch for uC configuration

  • PCB: FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen component print

  • Dimensions 100x65 mm (3.9 x 2.5 ")

The purpose of this guide is to describe AT91SAM7-P64 Development board.

Board | OKI-H5003
Hardware details | Describes the hardware peripherials in detail
Programming | describes how to write programs for the OKI-H5003 Board.
Revision | 01.01.2005 Creating

Copyright (c) OLIMEX Ltd. All rights reserved


Picture

This is picture of OKI-H5003 Development board.

Board OKI-H5003

Copyright (c) OLIMEX Ltd. All rights reserved


OKI-H5003


OKI-H5003 Board


OKI-H5003 Hardware description

Peripherials

Unit | Description
USB Connector | USB connector type B
SDRAM | 16MB (8MB x 16bit) 7.5 ns / 166Mhz
Flash | 8MB (4MB x16 bit) 80 ns
SRAM | 512KB (256KB x16 bit) 10 ns
JTAG connector | 2x10 0,1" step connector for programming with ARM-JTAG.
Leds | Status led (Led1) connected to PIOC[7] (PIN 60) and power led indicator

Technical characteristics

Parameter | Description
Voltage Supply | min 6.0V DC, max 9.0V DC min 4.5V AC, max 6.0V AC or USB power supply
CPU | ML67Q500x
Board dimensions | 100x65 mm (3.9 x 2.5 ")
PCB | FR-4, 1.5 mm (0,062"), green soldermask, white silkscreen component print
Operating Temperature | form 0ºC to 70ºC

Extension port 1

Pin / Name | Connected to: | Functionality
1 - EXT1-1 | PIN 30 | XA[0]
2 - EXT1-2 | PIN 31 | XA[1]
3 - EXT1-3 | PIN 32 | XA[2]
4 - EXT1-4 | PIN 33 | XA[3]
5 - EXT1-5 | PIN 35 | XA[4]
6 - EXT1-6 | PIN 36 | XA[5]
7 - EXT1-7 | PIN 37 | XA[6]
8 - EXT1-8 | PIN 38 | XA[7]
9 - EXT1-9 | PIN 39 | XA[8]
10 - EXT1-10 | PIN 40 | XA[9]
11 - EXT1-11 | PIN 42 | XA[10]
12 - EXT1-12 | PIN 43 | XA[11]
13 - EXT1-13 | PIN 44 | XA[12]
14 - EXT1-14 | PIN 45 | XA[13]
15 - EXT1-15 | PIN 46 | XA[14]
16 - EXT1-16 | PIN 48 | XA[15]
17 - EXT1-17 | PIN 49 | XA[16]
18 - EXT1-18 | PIN 50 | XA[17]
19 - EXT1-19 | PIN 52 | XA[18]
20 - EXT1-20 | FLASH memory | -
21 - EXT1-21 | FLASH memory | -
22 - EXT1-22 | FLASH memory | -
23 - EXT1-23 | FLASH memory | -
24 - EXT1-24 | FLASH memory | -
25 - EXT1-25 | PIN 61 | XOE_N
26 - EXT1-26 | PIN 63 | XWE_N
27 - EXT1-27 | PIN 64 | XBWE_N[0]
28 - EXT1-28 | PIN 65 | XBWE_N[1]
29 - EXT1-29 | PIN 66 | XROMCS_N
30 - EXT1-30 | PIN 67 | XRAMCS_N
31 - EXT1-31 | PIN 68 | XIOCS_N[0]
32 - EXT1-32 | PIN 70 | XIOCS_N[1]
33 - EXT1-33 | PIN 71 | XIOCS_N[2]
34 - EXT1-34 | PIN 72 | XIOCS_N[3]

Extension port 2

Pin / Name | Connected to: | Functionality
1 - EXT2-1 | PIN 6 | XD[0]
2 - EXT2-2 | PIN 7 | XD[1]
3 - EXT2-3 | PIN 8 | XD[2]
4 - EXT2-4 | PIN 9 | XD[3]
5 - EXT2-5 | PIN 10 | XD[4]
6 - EXT2-6 | PIN 13 | XD[5]
7 - EXT2-7 | PIN 14 | XD[6]
8 - EXT2-8 | PIN 16 | XD[7]
9 - EXT2-9 | PIN 19 | XD[8]
10 - EXT2-10 | PIN 20 | XD[9]
11 - EXT2-11 | PIN 21 | XD[10]
12 - EXT2-12 | PIN 24 | XD[11]
13 - EXT2-13 | PIN 25 | XD[12]
14 - EXT2-14 | PIN 27 | XD[13]
15 - EXT2-15 | PIN 28 | XD[14]
16 - EXT2-16 | PIN 29 | XD[15]
17 - EXT2-17 | PIN 85 | XBS_N[0]
18 - EXT2-18 | PIN 86 | XBS_N[0]
19 - EXT2-19 | PIN 115 | DRAME_N
20 - EXT2-20 | PIN 60 | PIOC[7] / XWR
21 - EXT2-21 | PIN 88 | PIOD[0] / XWAIT
22 - EXT2-22 | PIN 89 | PIOD[1] / XCAS_N
23 - EXT2-23 | PIN 92 | PIOD[2] / XRAS_N
24 - EXT2-24 | PIN 93 | PIOD[3] / XSDCLK
25 - EXT2-25 | PIN 94 | PIOD[4] / XSDCS_N
26 - EXT2-26 | PIN 96 | PIOD[5] / XSDCKE
27 - EXT2-27 | PIN 73 | PIOD[6] / XCAS_N[1]
28 - EXT2-28 | PIN 74 | PIOD[7] / XCAS_N[0]
29 - EXT2-29 | 3.3V | -
30 - EXT2-30 | 3.3V | -
31 - EXT2-31 | VIN | -
32 - EXT2-32 | VIN | -
33 - EXT2-33 | GND | -
34 - EXT2-34 | GND | -

Extension port 3

Pin / Name | Connected to: | Functionality
1 - EXT3-1 | PIN 122 | PIOA[0] / SIN
2 - EXT3-2 | PIN 123 | PIOA[1] / SOUT
3 - EXT3-3 | PIN 133 | PIOA[2] / CTS
4 - EXT3-4 | PIN 135 | PIOA[3] / DSR
5 - EXT3-5 | PIN 136 | PIOA[4] / DCD
6 - EXT3-6 | PIN 138 | PIOA[5] / DTR
7 - EXT3-7 | PIN 139 | PIOA[6] / RST
8 - EXT3-8 | PIN 140 | PIOA[7] / RI
9 - EXT3-9 | PIN 75 | PIOB[0] / DREQ[0]
10 - EXT3-10 | PIN 76 | PIOB[1] / DREQCLR[0]
11 - EXT3-11 | PIN 78 | PIOB[2] / DREQ[1]
12 - EXT3-12 | PIN 79 | PIOB[3] / DREQCLR[1]
13 - EXT3-13 | PIN 80 | PIOB[4] / TCOUT[0]
14 - EXT3-14 | PIN 81 | PIOB[5] / TCOUT[1]
15 - EXT3-15 | PIN 144 | PIOB[6] / TXD
16 - EXT3-16 | PIN 2 | PIOB[7] / RXD
17 - EXT3-17 | PIN 82 | PIOC[0] / PWMOUT[0]
18 - EXT3-18 | PIN 83 | PIOC[1] / PWMOUT[1]
19 - EXT3-19 | PIN 103 | PIOE[0] / SCLK
20 - EXT3-20 | PIN 104 | PIOE[1] / SDI
21 - EXT3-21 | PIN 105 | PIOE[2] / SDO
22 - EXT3-22 | PIN 142 | PIOE[3] / SDA
23 - EXT3-23 | PIN 143 | PIOE[4] / SCL
24 - EXT3-24 | PIN 98 | PIOE[5] / EXINT_N[0]
25 - EXT3-25 | PIN 99 | PIOE[6] / EXINT_N[1]
26 - EXT3-26 | PIN 100 | PIOE[7] / EXINT_N[2]
27 - EXT3-27 | PIN 101 | PIOE[8] / EXINT_N[3]
28 - EXT3-28 | PIN 102 | PIOE[9] / FIQ_N
29 - EXT3-29 | PIN 111 | CKO
30 - EXT3-30 | PIN 23 | NC
31 - EXT3-31 | 3.3V | -
32 - EXT3-32 | 5V_USB | -
33 - EXT3-33 | GND | -
34 - EXT3-34 | GND | -

AEXT

Pin / Name | Connected to: | Functionality
1 - AEXT-1 | 3.3V | -
2 - AEXT-2 | PIN 125 | VREFP
3 - AEXT-3 | PIN 126 | AINT0
4 - AEXT-4 | PIN 130 | VREFN
5 - AEXT-5 | PIN 127 | AINT1
6 - AEXT-6 | GND | -
7 - AEXT-7 | PIN 128 | AINT2
8 - AEXT-8 | GND | -
9 - AEXT-9 | PIN 129 | AINT3
10 - AEXT-10 | GND | -

USB Connector

Pin / Name | Connected to: | Functionality
1 - +5V | +5V DC | -
2 - USBDM | FT232BM (PIN 8) | USBDM
3 - USBDP | FT232BM (PIN 7) | USBDP
4 - GND | GROUND | -

Jumpers

Jumpers | Position | Description
Jumper 1 (LED_E) |  | RED led is not connected
 |  | RED led connected to PIOC[7] (PIN 60)

Slide switch

Switch

Position

Description
Slide switch

1 - CKOE
CKOE | Description
ON | CKO output enabled.
OFF | CKO output disabled.
2 - BSEL0
3 - BSEL1
BSEL1 | BSEL0 | BOOT Device
OFF | OFF | Internal Flash (External ROM for ML675001)
OFF | ON | External ROM
ON | x | Boot ROM
4 - CLKMD0
5 - CLKMD1
PLL mode | CLKMD1 | CLKMD0 | HF Crystal | Note
8 time | ON | ON | 5 to 7.5 MHz | -
4 time | ON | OFF | 5 to 17 MHz | -
1 time | OFF | ON | 20 to 56 Mhz | A crystal cannot be used.
reserved | OFF | OFF | - | -
6 - DRAME
DRAME | Description
ON | DRAM function enabled.
OFF | DRAM function disabled.
7 - JSEL
JSEL | Description
ON | Boundary scan.
OFF | On-board debug.
8 - not connected

Copyright (c) OLIMEX Ltd. All rights reserved


Links

1. OKI Semiconductors web site

OKI product datasheets, application notes, etc info:
http://www.okisemi.com/

2. OKI microcontrollers discussion forum

http://groups.yahoo.com/group/arm-olimex/ - forum for discussions on Olimex ARM boards

3. IAR Systems EW-ARM C compiler and debugger

http://www.iar.com/Products/?name=EWARM

4. Rowley associates CrossWorks for ARM C compiler and debugger

http://www.rowley.co.uk


Programming: RS232

RS232 Connector

Pin / Name | Description
1 - CD | Carrier Detected.
2 - RXD | Received Data.
3 - TXD | Transmited Data.
4 - DTR | Data Terminal Ready.
5 - GND | Signal Ground.
6 - DSR | Data Set Ready.
7 - RTS | Request to Send.
8 - CTS | Clear to Send..
9 - RI | Ring Indicator.

Register description

Register | Address | Function
UARTRBR | 0xB7B00000 | Receiver Buffer Register.
UARTTHR | 0xB7B00000 | Transmitter Holding Register.
UARTIER | 0xB7B00004 | Interrupt Enable Register.
UARTIIR | 0xB7B00008 | Interrupt Identification Register.
UARTFCR | 0xB7B00008 | FIFO Control Register.
UARTLCR | 0xB7B0000C | Line Control Register.
UARTMCR | 0xB7B00010 | Modem Control Register.
UARTLSR | 0xB7B00014 | Line Status Register.
UARTMSR | 0xB7B00018 | Modem Status Register.
UARTSCR | 0xB7B0001C | Scratch Register.
UARTDLL | 0xB7B00000 | Divisor Latch (LSB).
UARTDLM | 0xB7B00004 | Divisor Latch (MSB).

1.Initialization

1.1. Set Control Register
UARTLCR | Function | Description
0:1 | LCR[1:0] | These bits specify the character length (5 to 8 bits). 0 0 5 bits 0 1 6 bits 1 0 7 bits 1 1 8 bits
2 | LCR[2] | This bit specifies the number of stop bits for transmitting characters. 0: 1 stop bits 1: 2 stop bits (1.5 for character length = 5)
3 | LCR[3] | This bit controls the use of parity. 0: No parity 1: Parity used
4 | LCR[4] | This bit specifies even or odd parity. This setting is only valid, however, when parity is enabled (LCR[3] = “1”). 0: Odd parity. 1: Even parity.
5 | LCR[5] | Stick parity. A “1” in this bit sets all parity bits to a fixed value, the inverse of the bit in LCR[4]. This setting is only valid, however, when parity is enabled (LCR[3] = “1”). The receiver can therefore check the parity using a known state. LCR[5] LCR[4] LCR[3] 0 0 1 Odd parity 0 1 1 Even parity 1 0 1 Fixed parity (“1”) 1 1 1 Fixed parity (“0”)
6 | LCR[6] | Break control. Setting this bit to “1” sends a break signal by driving the serial output (SOUT) at Low level, or spacing state. Setting this bit to “0” disables the break. This break control function affects only SOUT, masking SOUT output. The transmit operation continues internally. The CPU can use this break control function to send a warning to the computer communications system terminal. 0: Normal operation. 1: Transmit break signal.
7 | LCR[6] | Divisor latch access bit (DLAB). This bit switches access between UARTDLL and UARTDLM and UARTRBR, UARTTHR, and UARTIER. 0: Normal operation (accessing UARTRBR, UARTTHR, UARTIIR) 1: Divisor latch (UARTDLL and UARTDLM) access..

1.2 Set Baud Rate

Divisor Latch (LSB) (UARTDLL) This register contains the lower half of the 16-bit divisor latch for the baud rate generator. For further details, see the section on baud rate clock generation. The CPU has read/write access to this register when LCR[7] = 1. The register contents after a reset are indeterminate.

Divisor Latch (MSB) (UARTDLM) This register contains the upper half of the 16-bit divisor latch for the baud rate generator. For further details, see the section on baud rate clock generation. The CPU has read/write access to this register when LCR[7] = 1. The register contents after a reset are indeterminate.

Baud rate frequency = CCLK / (devisor x 16)

1.3. Set Functionality to pins

Set second functionality to pins.

2. RS232 Communication

2.1. Write to RS232

Use follow algorithm to send data:
- fill US_THR register with data to write
- wait shift all data

2.2. Read from RS232

Use follow algorithm to receive data:
- wait read all data
- get data from U0RBR

3. Example

 //Baud rate
    frequency = CCLK/(devisor x 16)
//devisor = CCLK/(Baud rate frequency x 16)
//CCLK = 14 745 600
//Baud rate frequency = 9 600
//calculate -> devisor = 0x60
//
//CCLK = 20 000 000
//Baud rate frequency = 9 600
//calculate -> devisor = 0x83

unsigned short divisor = 0x83;

UARTLCR_bit.LCR10 = 0x3;
    //8 bit
UARTLCR_bit.LCR2 = 0x0;
    //1 stop bit
UARTLCR_bit.LCR3 = 0x0;
    //no parity
UARTLCR_bit.LCR7 = 0x1;
    //enable DLAB

UARTDLL = divisor & 0xFF;        //set
    low byte from the 16-bit divisor.
UARTDLM = (divisor >> 8) & 0xFF; //set igh byte from the 16-bit divisor.
UARTLCR_bit.LCR7 = 0x0;
    //disable DLAB

GPCTL_bit.GPCTL0 = 1;
    //set second function of port.

Read Data:
   while (UARTLSR_bit.LSR0 != 1);
   return UARTRBR;

Write Data:
while (UARTLSR_bit.LSR5
    != 1);
UARTTHR = a;