Access to information is restricted depending on your login.
Request login-information through our contact form.
Trizeps6 CPLD
This page explains the default-functionality of the Trizeps6 CPLD.
Keith & Koep can deliver Trizeps6 with customized CPLD-content. In example if not needed, the 26 address-pins of the Trizeps6 may be used as GPIO or one of the UART's can be multiplexed to allow even more serial-ports.
Currently there are two basic CPLD-versions:
- for Trizeps6 with WLAN/Bluetooth ( 26060 and 26080)
- for Trizeps6 without WLAN/Bluetooth ( 26020 and 26040)
The main difference between these modules is, that the ones with WLAN/Bluetooth only have an 8Bit multiplexed Address/Databus.
Default functions:
- Decode the multiplexed Address-/Databus to form 4 ChipSelects with 64MB of address-space each.
- Power-Management of the module.
- Control special-functions like GPIO and PWM.
Address-Mapping
The CPLD is connected to CS0 of the processor (0×80000000 physical-address).
| A27 | A26 | A25 | Offset | Description |
|---|---|---|---|---|
| 0 | 0 | - | 0×00000000 | CS 64MB ( reserved for future use) |
| 0 | 1 | - | 0×04000000 | CS1 64MB |
| 1 | 0 | - | 0×08000000 | CS3 64MB |
| 1 | 1 | 0 | 0x0C000000 | CS4 32MB |
| 1 | 1 | 1 | 0x0E000000 | CPLD-Registers |
Modules without WLAN/BT
For modules without WLAN/BT, you simply do an 16bit data-access with the given offset:
volatile short *padr = (volatile short*)PLATFORM_BASE_VA_CS3; *padr = 123;
Modules with WLAN/BT
For modules which use D[15..8] for WLAN, Keith & Koep offers 2 options:
1. Reduced Address-Space
Because D[15..8] are latched to create the A[31..24] and A[15..8] address-lines and are not availlable on modules which use them for WLAN, the CPLD only decodes a reduced address space and shifts A[23..16] by four bits to the left.
| Access | Address | Description |
|---|---|---|
| 1 | 0xooaaoobb | a: Address 27..20; bb: Address 7..0 → 0x0aa000bb |
With this configuration it is still possible to access 8192 addresses (A[0] unused).
volatile short *padr = (volatile short*)PLATFORM_BASE_VA_CS3; *padr = 123;
2. Whole Address-Space
To be able to use the whole address-space on modules which use D[15..8] for WLAN, you must do two successive reads/writes.
Read/Writes to the internal CPLD-registers only need one access!!
The address of the first read specifies address-lines 27..24 and 7..0.
The second read/write specifies the address-lines 23..16 and 15..0.
| Access | Address | Description |
|---|---|---|
| 1 | 0xoooaoobb | a: Address 27..24; bb: Address 7..0 |
| 2 | 0xooccoodd | cc: Address 23..16; dd: Address 15..8 |
o == don't care.
Data of the first access is ignored!
Write-Example:
volatile short *padr;
padr = (volatile short*)( csbase + (offset & 0xFF00FFFF) + ((offset>>8)&0x00FF0000));
*padr = 0; // dummy write to latch A[27..24] and A[7..0];
padr = (volatile short*)( csbase + (offset & 0xFFFFFF00) + ((offset>>8)&0x000000FF));
*padr = value; // latch A[23..16], A[15..8] and write value to address;
When using Windows Embedded CE, you may use following drvlib_app-functions: DFIOMapSpace , DFIOWrite, DFIORead.
CPLD-Registers
| A4 | A3 | A2 | A1 | Offset | Description | Write | Read | Virtual Bootloader-Address |
|---|---|---|---|---|---|---|---|---|
| 0 | 0 | 0 | s/c | 0×0000 | REG_CONTROL | Control/Reset | Module Version | 0xbf7e0000, 0xbf7e0002 |
| 0 | 0 | 1 | s/c | 0×0004 | REG_FEATURE | Features/Pin-Routing | CPLD-Feature | 0xbf7e0004, 0xbf7e0006 |
| 0 | 1 | 0 | s/c | 0×0008 | REG_HIBERNATE | Hibernate/Wake-Control | - | 0xbf7e0008, 0xbf7e000a |
| 0 | 1 | 1 | - | 0x000c | REG_PWM | PWM(6..0) | - | 0xbf7e000c |
| 1 | 0 | 0 | s/c | 0×0010 | REG_PINLDR | Pin-Direction | Pin-Level | 0xbf7e0010, 0xbf7e0012 |
| 1 | 0 | 1 | s/c | 0×0014 | REG_PINSET | Pin-Level | - | 0xbf7e0014, 0xbf7e0016 |
| 1 | 1 | 0 | s/c | 0×0018 | REG_TTLIO | TTL-Output-Port | TTL-Input-Port | 0xbf7e0018, 0xbf7e000a |
s/c:
0 - set specified bits.
1 - clear specified bits.
-: don't care.
REG_CONTROL (0xbf7e0000, 0xbf7e0002)
| Bit | Description |
|---|---|
| 0 | Global Reset |
| 1 | - |
| 2 | Reset Audio/Touch Codec |
| 3 | Reset Ethernet-Phy |
| 4 | Reset WLAN |
| 5 | Reset Bluetooth |
| 6 | - |
| 7 | - |
read: Reading this register returns the lower part of the Trizeps6 item-number: i.e. 26040 returns 40, 26080 returns 80. In that way you can determine if you need to access the module using 8bit or 16bit DFIO-bus.
REG_FEATURE (0xbf7e0004, 0xbf7e0006)
| Bit | Description |
|---|---|
| 0 | Route UART3 to SODIMM |
| 1 | Route UART3 to Bluetooth |
| 2 | CompactFlash-mode (disable UART3) |
| 3 | Use TTLIO (see description of TTLIO-register) |
| 4 | Output PWM on SODIMM-Pin 69 |
| 5 | Output PWM on SODIMM-Pin 77 |
| 6 | Output PWM on SODIMM-Pin 106 |
| 7 | Route Bluetooth-PCM to SODIMM ( 188(A16): PCM_SYNC, 186(A17): PCM_CLK, 184(A18): PCM_OUT, 146(A19): PCM_IN) |
REG_HIBERNATE (0xbf7e0008, 0xbf7e000a )
| Bit | Description |
|---|---|
| 0 | Enter Hibernate Mode |
| 1 | Wake on Touch |
| 2 | Wake on EXT_WAKEUP (PMIC) |
| 3 | Wake on IRQ (SODIMM-Pin 43) |
| 4 | - |
| 5 | - |
| 6 | - |
| 7 | - |
REG_PWM (0xbf7e000c)
D[6..0] PWM-Match-value.
REG_PINLDR (0xbf7e0010, 0xbf7e0012)
| Bit | Description |
|---|---|
| 0 | SODIMM-Pin 69 |
| 1 | SODIMM-Pin 100 (PSKTSEL) |
| 2 | SODIMM-Pin 98 (CF_nREG) |
| 3 | SODIMM-Pin 104 (CF_nIOIS16) |
| 4 | SODIMM-Pin 93 (RDnWR) |
| 5 | - |
| 6 | - |
| 7 | - |
read: read level of pin.
write: write direction of pin. 1:output, 0:input.
REG_PINSET (0xbf7e0014, 0xbf7e0016)
| Bit | Description |
|---|---|
| 0 | SODIMM-Pin 69 |
| 1 | SODIMM-Pin 100 (PSKTSEL) |
| 2 | SODIMM-Pin 98 (CF_nREG) |
| 3 | SODIMM-Pin 104 (CF_nIOIS16) |
| 4 | SODIMM-Pin 93 (RDnWR) |
| 5 | - |
| 6 | - |
| 7 | - |
read: -.
write: write level of pin.
REG_TTLIO (0xbf7e0018, 0xbf7e001a)
Uses address pins as input and output-pins, when USE_TTLIO is set in REG_FEATURE.
| Bit | Description | |
|---|---|---|
| Write | Read | |
| 0 | A8 | A0 |
| 1 | A9 | A1 |
| 2 | A10 | A2 |
| 3 | A11 | A3 |
| 4 | A12 | A4 |
| 5 | A13 | A5 |
| 6 | A14 | A6 |
| 7 | A15 | A7 |
read: read level of pin.
write: write level of pin.
(C) 2009 Keith & Koep GmbH. All rights reserved. Terms of Use