Bitrelle LPC2368 Module 1.0 Board Manual · 2012. 6. 3. · To operate our Bitrelle Tech SCHAEFER...
Transcript of Bitrelle LPC2368 Module 1.0 Board Manual · 2012. 6. 3. · To operate our Bitrelle Tech SCHAEFER...
Bitrelle LPC2368 Module 1.0
Board Manual
1 Specifications
Bitrelle Tech SCHAEFER LPC2368 USB Rapid Prototyping and Development Board.
Microcontroller
Chip: NXP LPC2364
Processor Core: 32bit ARM7TDMI-S
CPU Clock: 12MHz .. 72MHz
JTAG Debugging and Programming Interface
In System Programming via on-chip Bootloader Software and Serial Interface
General Purpose DMA Controller
Vectored Interrupt Controller with 32 IRQ's
Four General Purpose 32bit Timers
Memory
Static RAM Size: 32kB
Flash Size: 128kB
Flash Endurance: min. 10.000 Cycles
Flash Data Retention: min. 10 Years
Dimensions
Length x Width: 80mm x 50,8mm
Height: 11,6 mm
Stacking Height: 5mm
Bores
Bore Diameter: 3,2mm
Short Distance: 44,8mm
Long Distance: 74mm
Operating Voltage
USB Voltage: 4,75V .. 5,25V
Power Connector Input Voltage: 6,5V .. 12V
Inverse Polarity Protection: 14V, 5W, fuse may blow
2
Operating Current
Processor Core Current: typ. 63mA @ 60MHz, 25°C, while(1){}, all Perhiperals off
Processor Core Current: typ. 92mA @ 60MHz, 25°C, while(1){}, all Perhiperals on
Maximum Board Current: 800mA, 400mA (USB)
Fast Acting SMD Chip Fuses: Bel Fuse Type C1Q 1A , 500mA
Operating Temperature
Ambient Temperature: -40°C .. 85°C
LED
Programmable LED's: yellow (590nm) x 4
Power LED: red (635nm)
USB Connect LED: yellow (590nm)
USB Up LED: green (523nm)
Luminous Intensity: typ. 130 cd
Viewing Angle: 140°
RS-232
Transceiver: MAX3232
Input Voltage: -25V .. +25V
Input Threshold Low: min. 0,8V
Input Threshold High: max. 2,4V
Input Resistance: 3kOhm .. 7kOhm
Output Voltage Low: max. 0,4V
Output Voltage Min: min. 4,4V
CAN
Number of Ports: 2
Transceiver: TJA1040 x 2
Input Voltage: -27V .. + 40V
Differential Input Threshold Voltage: typ. 0,7V
Differential Input Resistance: 25kOhm .. 75kOhm
Differential Input Capacitance: max. 10pF
Differential Output Recessive Voltage: -50mV .. +50mV
Differential Output Dominant Voltage: 1,5V .. 3V
3
Output Recessive Voltage CANH, CANL: typ. 2,5V
Output Dominant Voltage CANH: typ. 3,6V
Output Dominant Voltage CANL: typ. 1,4V
USB
Protocol: USB 2.0
Data exchange rate: 12Mbit/s (full speed)
Connection: mini USB standard cable
Expansion Ports
Number of Ports: 2
Length x Width: 17,2mm x 3,8mm
Stacking Height: 5mm
Number of Pins: 60
18 Pins: 5V tolerant Input/Output
2 Pins: stabilized 5V Output Voltage: 4,9V .. 5,1V
2 Pins: stabilized 3,3V stabilized Output Voltage: 3,2V .. 3,4V
6 Pins: JTAG
2 Pins: UART0
2 Pins: CAN1
2 Pins: I2C Bus
4 Pins: SPI0 Bus
4 Pins: SPI1 Bus
18 Input/Output Pins
Input Voltage: min. 0V .. max. 5,5V
Input Voltage High: min. 2V
Input Voltage Low: max. 0,8V
Output Voltage High: min. 2,8V
Output Voltage Low: max. 0,4V
Output Current High: min. -4mA
Output Current Low: min. 4mA
Output Short-Circuit-Current High: max. -45mA
Output Short-Circuit-Current Low: max. 50mA
4
2 Operation
To operate our Bitrelle Tech SCHAEFER LPC2368 USB Rapid Prototyping and Development Board do the following steps:
1. Connect board with the JTAG debugger.
2. Place the LED jumper
3. Place the DBGEN jumper
4. Connect the power connector with the right polarity
5. Give min. 6,5V to max. 12V on power line
6. Connect USB connector
or
4. Connect USB connector
5. Power line is only needed if You use peripherals that need regulated 5V supply
It is possible to connect lower voltages than 6,5V, e.g. 6V, at the power line but then the stabilized 5V voltage on the expansion ports may be below the guaranteed 4,9V.
If You connect more than 12V the SMD fuse will blow, and it has to be replaced. If You change the polarity by accident, the board has an inverse polarity protection, indeed, but the fuse may also blow.
It's possible to program the board via the RS-232 connector by use of the in system programming on-chip bootloader software. For more details read the NXP microcontroller manuals.
5
3 Jumper
If You look from below on the lower side of the board with the expansion port on the right side You see these jumper rail in front of You:
Name Meaning
DEF Free programmable input jumper
ISP In system programming (ISP) jumper for activating the bootloader
JTAG n/a
LED Activate the LED's with this jumper
DBGEN Jumper for activating JTAG Debug functions, otherwise JTAG boundary scan
This is the jumpers You need, if You once have to reorder them:
6
4 JTAG Debugger
If You look from the side on Your LPC2129 board and the board lies normal upside on the desk, You see the JTAG debug port with the following polarities:
JTAG
GND RST TDO RTCK TCK TMS TDI TRST 3.3V
The signals have the following meaning:
Name Meaning (from the NXP LPC2129 user manual)
GND Ground.
nRST Global Reset. Triggers the microcontroller reset input pin
TDO Test Data Output. This is the serial data output from the shift register. Data is shifted out of the device on the negative edge of the TCK signal
RTCK Returned Test Clock. Extra signal added to the JTAG port. Required for designs based on ARM7TDMI-S processor core. Multi-ICE (Development system from ARM) uses this signal to maintain synchronization with targets having slow or widely varying clock frequency.
TCK Test Clock. This allows shifting of the data in, on the TMS and TDI pins. It is a positive edge- triggered clock with the TMS and TCK signals that define the internal state of the device.
TMS Test Mode Select. The TMS pin selects the next state in the TAP state machine.
TDI Test Data In. This is the serial data input for the shift register.
nTRST Test Reset. The nTRST pin can be used to reset the test logic within the EmbeddedICE logic
3.3V 3V3 Supply Voltage. For JTAG Debuggers that need this potential.
You need a JTAG debugging adapter to communicate with the board. If You already own a JTAG adapter You can order a cable adapter at Bitrelle's web shop at
www.bitrelle.com
You can also buy a tiny and priceless JTAG adapter for the Bitrelle boards there.
7
If You already own a JTAG adapter, make sure, Your debugging adapter is supported by OpenOCD. You can read which devices are supported by OpenOCD newest at
http://openocd.sourceforge.net/supported-jtag-interfaces/
Here's an excerpt of this list:
USB FT2232 Based:✗ usbjtag ✗ jtagkey ✗ jtagkey2 ✗ oocdlink ✗ signalyzer ✗ Luminary ICDI ✗ olimex-jtag ✗ flyswatter ✗ turtelizer2 ✗ comstick ✗ stm32stick ✗ axm0432_jtag ✗ cortino ✗ dlp-usb1232h
USB-JTAG / Altera USB-Blaster compatibles:✗ USB-JTAG Kolja Waschk's USB Blaster-compatible adapter ✗ Altera USB-Blaster
USB JLINK based:✗ SEGGER JLINK ✗ IAR J-Link
USB RLINK based:✗ Raisonance RLink ✗ STM32 Primer ✗ STM32 Primer2
USB Other:✗ USBprog ✗ USB - Presto ✗ Versaloon-Link ✗ ARM-JTAG-EW
IBM PC Parallel Printer Port Based:✗ Wiggler - There are many clones of this. ✗ Wiggler2 ✗ Wiggler_ntrst_inverted ✗ arm-jtag ✗ chameleon
8
Connect Your Debugging adapter to Your PC.
Your debugging adapter will only work, it it is supported by OpenOCD AND if it was compiled into the OpenOCD executable. Make sure that You compiled OpenOCD correctly or that Your provider did this for You.
Open a new terminal and type in the command line:
openocd-0.5.0.exe -f target/lpc2129.cfg -f interface/jtagkey.cfg
or
openocd-0.5.0.exe -f target/lpc2378.cfg -f interface/jtagkey2.cfg
This command can only work, if You installed OpenOCD correctly and added the environment variables correctly. If You didn't, look into the Windows/Linux Install Manual, chapter 'JTAG Debugger'.
Make sure, that You use the correct configuration files. Compare Your target configuration files with the files in 'Annex OpenOCD target config files'. The configuration files of Your installation are located in Your OpenOCD directory:
• Windows e.g.: C:\Bitrelle\openocd-0.5.0
• Linux e.g.: /usr/local/share/openocd/scripts/
When You start OpenOCD You might get an error message like that:
This is no important error as long as You only have one device in the JTAG scan chain, otherwise it is important. You can change the <cputapid> value in the 'lpc2129.cfg' file to prevent this error message:
setup_lpc2xxx lpc2129 0x4f1f0f0f 0x40000 lpc2000_v1 0x4000
The <cputapid> value is a number like 0x4f1f0f0f, 0x5f1f0f0f, 0xcf1f0f0f, the OpenOCD output error message tells You the right number to insert.
9
After You have inserted the <cputapid> into the 'lpc2129.cfg' file, start OpenOCD again. From now on You should get no error messages again:
To shutdown OpenOCD use the key combination
<CTRL>+C
OpenOCD can be controlled by GCC directly or via Eclipse. This will be explained in the later chapters. There is another method to get access to Your target by controlling OpenOCD with a Telnet connection.
If You don't have a Telnet client installed on Your Windows PC have a look into the Windows install manual annex to see how to install it. Linux users should know how to install a Telnet network client with the help of of one of their distributions software installation tools.
You start the Telnet connection when OpenOCD is running by opening a new command line window and typing:
telnet localhost 4444
or
telnet 127.0.0.1 4444
Both commands mean the same. 4444 is the default Telnet port of OpenOCD and 127.0.0.1 is simply the IP address of 'localhost'.
The OpenOCD Telnet connection will open and You can type commands into the OpenOCD command line. Find the table at the end of this chapter to see the most important OpenOCD commands. The 'usage' command shows You all possible commands and with 'help [command]' You can read more about it.
As an example You can study the following sequence of OpenOCD commands:
pwd
add_script_search_dir c:\Bitrelle\Data\Targets\Tutorials\LPC2129\Tut01_LED
halt
arm core_state arm
load_image Build/LPC2129RAM/tut01_LED_ram.elf
step 0x40000000
10
resume
halt
bp 0x400001b0 4
bp 0x400001b0 4 hw
bp 0x400001e8 4 hw
bp 0x40000468 4
bp 0x40000480 4
bp
resume
There are two hardware watchpoint/breakpoint units on the target CPU chip available. The (pseudo-code) sequence:
bp [address1] 4
bp [address1] 4 hw
bp [address2] 4 hw
bp [address3] 4
bp [address4] 4
etc.
enables the first watchpoint/breakpoint unit for software breakpoints. Now, it is possible to set in RAM as many software breakpoints as You need. This is not possible if You are debugging a program in the FLASH memory.
A program in the Flash memory can only use 2 breakpoints, because in the FLASH memory it is not possible to use software breakpoints.
This is not an OpenOCD issue. It is the case for all debuggers working with ARM 7 CPU's.
The sequence:
bp [address1] 4 hw
bp [address2] 4 hw
sets two hardware breakpoints. Now it's not possible to set any more breakpoints, especially no software breakpoints, even if You are working in the RAM, because software breakpoints need one of the two hardware watchpoint/breakpoint units to manage them.
11
This is a typical Telnet session with OpenOCD and a program residing in the RAM, where You can set as many software breakpoints as You want (it's similar to the sequence above):
12
The most important OpenOCD command line instructions
Command Command, alternative
Explanation
exit leave OpenOCD command line
usage usage [command] show commands
help [command] more detailed help regarding command
pwd print working directory
add_script_search_dir [directory path]
add directory path for searching script or binary files
load_image [image] [offset]
load a binary image to the address provided with the linker script and the additional offset
soft_reset_halt stop CPU and set program counter back to reset vector
halt halt JTAG debugger
resume resume [address] resume running program or resume running program at address
step step [address] step one machine instruction or step to address
bp show list of breakpoints
bp [address] [size] set soft breakpoint at instruction address, size is 4 for ARM and 2 for Thumb mode
bp [address] [size] hw set hardware breakpoint at instruction address, size is 4 for ARM and 2 for Thumb mode
rbp [address] remove breakpoint at address
poll [on/off] poll target for state changes
arm reg show registers and values
arm core_state arm set CPU to ARM mode (not Thumb mode)
13
5 USB
If You look from the side on Your LPC2368 board You see the mini USB connector:
The USB controller and tranceiver are both within the microcontroller chip.
Specifications
Protocol: USB 2.0
Data exchange rate: 12Mbit/s (full speed)
Connection: mini USB standard cable
14
6 CAN
If You look from the side on Your LPC2368 board and the board lies normal upside on the desk, You see the two CAN ports with the following polarities:
CAN2 CAN1
CANL CGND(SPLIT)
CANH CANL CGND(SPLIT)
CANH
The CAN transceivers are two NXP TJA1040. They are broadly used in industry and automotive applications.
Specifications
Input Voltage: -27V .. + 40V
Differential Input Threshold Voltage: typ. 0,7V
Differential Input Resistance: 25kOhm .. 75kOhm
Differential Input Capacitance: max. 10pF
Differential Output Recessive Voltage: -50mV .. +50mV
Differential Output Dominant Voltage: 1,5V .. 3V
Output Recessive Voltage CANH, CANL: typ. 2,5V
Output Dominant Voltage CANH: typ. 3,6V
Output Dominant Voltage CANL: typ. 1,4V
15
7 RS-232
If You look from the side on Your LPC2368 board and the board lies normal upside on the desk, You see the RS-232 port with the following polarities:
RS232
GND RxD TxD
The RS-232 transceiver is a Maxim MAX3232, well known in many industrial applications.
Specifications
Input Voltage: -25V .. +25V
Input Threshold Low: min. 0,8V
Input Threshold High: max. 2,4V
Input Resistance: 3kOhm .. 7kOhm
Output Voltage Low: max. 0,4V
Output Voltage Min: min. 4,4V
16
8 Expansion Port
If You look from above on Your LPC2368 board and the board lies normal upside on the desk, with the labeling normal upside, You see the upper expansion port with the following polarities:
Pin Description
Pin Numb
Pin Numb
Pin Description
VDD Supply voltage 60 1 Global reset nRST
VDD 59 2 P0.30
+5V 5V stabilized 58 3 P0.29
+5V 57 4 P0.28
+3V3 3.3V stabilized 56 5 P0.27
+3V3 55 6 CAN1 TD1
TXD0 UART0 54 7 RD1
RXD0 53 8 Ground GND
SCL I2C 52 9 GND
SDA 51 10 GND
SCK0 SPI0 50 11 P0.22
MISO0 49 12 P0.21
MOSI0 48 13 SPI1 SSEL1
SSEL0 47 14 MOSI1
P1.16 46 15 MISO1
P1.17 45 16 SCK1
P1.18 44 17 USER0
P1.19 43 18 USER1
P1.20 42 19 USER2
P1.21 41 20 USER3
P1.22 40 21 P0.13
P1.23 39 22 P0.12
GND Ground 38 23 P0.11
GND 37 24 P0.10
RTCK JTAG 36 25 Ground GND
TDO 35 26 GND
TDI 34 27 GND
TCK 33 28 GND
TMS 32 29 GND
nTRST 31 30 GND
17
If You look from above on Your LPC238 board and the board lies normal upside on the desk, with the labeling normal upside, You see the upper expansion port with the pin number 1 on the upper right side:
The expansion port then is on the left side of the board:
The second expansion port lies on the reverse side of the board, and since all connectors are plated-through it is easy to assign the pin numbers mirror-inverted, if You look on the board from below.
18
Specifications
Number of Ports: 2
Length x Width: 17,2mm x 3,8mm
Stacking Height: 5mm
Number of Pins: 60
18 Pins: 5V tolerant Input/Output
2 Pins: stabilized 5V Output Voltage: 4,9V .. 5,1V
2 Pins: stabilized 3,3V stabilized Output Voltage: 3,2V .. 3,4V
6 Pins: JTAG
2 Pins: UART0
2 Pins: CAN1
2 Pins: I2C Bus
4 Pins: SPI0 Bus
4 Pins: SPI1 Bus
18 Input/Output Pins
Input Voltage: min. 0V .. max. 5,5V
Input Voltage High: min. 2V
Input Voltage Low: max. 0,8V
Output Voltage High: min. 2,8V
Output Voltage Low: max. 0,4V
Output Current High: min. -4mA
Output Current Low: min. 4mA
Output Short-Circuit-Current High: max. -45mA
Output Short-Circuit-Current Low: max. 50mA
19
9 Legal Annotation
The Bitrelle Tech SCHAEFER LPC2368 USB Rapid Prototyping and Development Board is a typical prototyping board. You get schematics and part lists (see annexes) with it. As though the board works very well and is tested several times we give absolutely no warranties.
20
10 Document History
Date Description Revision Number
Author(s)
2.6.2012 Initial Revision 1.0 R. Schaefer
21
11 Annex Schematics
22
23
12 Annex PartlistPart Value Package
3V3 REG1117 SOT223
5V REG1117-5 SOT223
C1 100n C0603
C2 100n C0603
C3 100n C0603
C4 100n C0603
C5 100n C0603
C6 100n C0603
C7 1u C0805
C9 10uT A/3216-18W
C10 10uT A/3216-18W
C12 18p C0603
C13 18p C0603
C15 100n C0603
C16 100n C0603
C17 100n C0603
C19 100n C0603
C20 100n C0603
C21 100n C0603
C22 100n C0603
C400 100p C0603
C47 47n C0603
C48 100n C0603
C49 100n C0603
C50 100n C0603
C51 100n C0603
C52 47n C0603
C53 100n C0603
C59 33uT CT3528
C60 33uT CT3528
24
CONCT CHIPLED gelb _0805
D2 BAS40 SOT23
D3 SMA 1A DO214AC
D4 BAS40 SOT23
D6 BAS40 SOT23
D7 BAS40 SOT23
FUSE1 RAPID 1A C1206
FUSE2 RAPID 500mA C1206
IC1 MAX3232 TSSOP16
IC2 74LVC1G125 SC70-5
IC3 74LVC1G125 SC70-5
IC4 74LVC1G125 SC70-5
IC5 74LVC1G125 SC70-5
LED1 CHIPLED gelb _0805
LED2 CHIPLED gelb _0805
LED3 CHIPLED gelb _0805
LED4 CHIPLED gelb _0805
POWER CHIPLED rot _0805
QG2 CFPS-39 CFPS-39
R1 10k R0603
R2 10k R0603
R3 10k R0603
R4 60R4 R0603
R5 60R4 R0603
R6 60R4 R0603
R7 22K R0603
R8 10k R0603
R9 10k R0603
R10 10k R0603
R11 10k R0603
R12 60R4 R0603
R13 10k R0603
R14 10k R0603
R15 660R R0603
25
R16 10k R0603
R17 660R R0603
R18 660R R0603
R19 10k R0603
R20 10k R0603
R21 660R R0603
R22 1K R0603
R23 33R R0603
R24 660R R0603
R25 33R R0603
R26 2K2 R0603
R27 10k R0603
R28 1K5 R0603
R29 660R R0603
R36 10k R0603
T1 PMBTA92 SOT23-BEC
U$1 LPC2368 TFBGA100
U$2 TJA1040 TJA1040
U$5 MCP130T-300-I SOT23B
U$6 10uH L1210
U$13 TJA1040 TJA1040
USB_UP CHIPLED gruen _0805
X2 53048-03 53048-03
X3 53048-09 53048-09
X11 53048-03 53048-03
X29 DF12D-3.0-60 DF12-3.0-60
X41 53048-03 53048-03
X42 53048-02 53048-02
X50 DF12D-3.0-60 DF12-3.0-60
X53 MINI-USB-UX60-MB-5ST UX60-MB-5ST
X77 87758-1016 87758-1016
ZENER 14V 5W SMB@1
26
27