CDK-8 OEM CobraNet Module

Design Guide

Date 8/29/2008

Revision 1.1

© Attero Tech, LLC 1315 Directors Row, Suite 107, Ft Wayne, IN 46808 Phone 260-496-9668 • Fax 260-496-9879 620-00001-01

CDK-8

Design Guide

Contents

1 – Overview ...... 2 1.1 – Notes on Modules ...... 2

2 – Interface Connectivity...... 3 2.1 – Pin Descriptions ...... 3 2.1.1 - Audio clocks ...... 3 2.1.2 – Digital audio...... 3 2.1.3 – Serial bridge ...... 4 2.1.4 – Control...... 4 2.1.5 – Power ...... 4 2.2 – Reference design...... 4

3 – HMI Interfacing...... 13 3.1 – External Memory Bus Example...... 13 3.1.1 – Schematic diagrams...... 13 3.1.2 – Software notes...... 15 3.1.3 – Source Code - ‘C’ file ...... 15 3.1.4 – Source code - header file ...... 20 3.2 – GPIO Port Example ...... 21 3.2.1 – Schematic diagram ...... 21 3.2.2 – Software notes...... 22 3.2.3 – HMI Setup and Initialization...... 23 3.2.4 – HMI Driver – Header file...... 23 3.2.5 – HMI Driver – ‘C’ code...... 24

4 – PCB Design Guidelines ...... 32 4.1 – Power Supply...... 32 4.2 – Clock Termination...... 32 4.3 – Clock parallel end termination ...... 32 4.4 – Grounding...... 32 4.5 – Signal Separation...... 32 4.6 – Chassis Grounding ...... 32

5 – End Product Bring-up hints...... 33 5.1 – Power Supplies ...... 33 5.2 – Clocks and I2S lines ...... 33 5.3 – LED activity...... 33

APPENDIX A – CDK-8DUART SHMI message protocol...... A-1 A1 – Terminology...... A-1 A2 – System Description ...... A-2 A3 – Serial Format...... A-3 A3.1 – Message Format ...... A-3 A3.2 – Read Messages...... A-4 A3.3 – Write Messages ...... A-5 A3.4 – Baud Rate Change Message ...... A-6 A3.5 – NACK Response Descriptions ...... A-6 A4 – Commands & Responses ...... A-8 A4.1 – Legend ...... A-9 A4.2 – sysDescr...... A-9 A4.3 – sysContact ...... A-9 A4.4 – sysName ...... A-9 A4.5 – sysLocation ...... A-10 A4.6 – ifPhysAddress...... A-10 A4.7 – flashPersistEnable ...... A-10 A4.8 – errorCode...... A-10 A4.9 – errorCount ...... A-10 A4.10 – modeRateControl ...... A-11 A4.11 – conductorStatus ...... A-11 A4.12 – serialFormat ...... A-11 A4.13 – serialBaud ...... A-12 A4.14 – serialRxMAC...... A-12

CDK-8

Design Guide

A4.15 – serialTxMAC...... A-12 A4.16 – rxSubFormat ...... A-12 A4.17 – rxBundle ...... A-13 A4.18 – rxSubMap...... A-13 A4.19 – txBundle...... A-14 A4.20 – txSubCount ...... A-14 A4.21 – txUnicastMode ...... A-14 A4.22 – txMaxUnicast ...... A-15 A4.23 – txSubMap...... A-15 A4.24 – txSubFormat...... A-15 A4.25 – ipMonCurrentIP ...... A-16 A4.26 – procMode...... A-16 A4.27 – stdUserVersionMajor ...... A-17 A4.28 – stdUserVersionMinor ...... A-17 A4.29 – stdUserString ...... A-17 A4.30 – stdUserInteger...... A-17

APPENDIX B – Introduction to CobraNet ...... B-1

APPENDIX C - Reference Documents...... iii

CDK-8

Design Guide

1 – Overview This design guide has been assembled to aid in the integration of the CDK-8D CobraNet enabled family of modules for OEM applications.

This guide contains schematic examples for connecting the audio interfaces, schematics and sample code showing various methods of connecting the HMI control interface, PCB layout guidelines and also some end-product bring up hints and tips. For those not familiar with CobraNet, there is also a brief overview of CobraNet and its features in APPENDIX B.

1.1 – Notes on Modules The CDK-8's are shipped with the DSP processing bypassed and they contain no DSP customization whatsoever. Essentially, they are a blank canvas. This may be suitable for your application as is but its likely you will want to use the on board user DSP to manipulate the within the device. If that is the case, additional design steps are required to customize the CDK-8.

If you do intend to customize the module, you will need to obtain DSP Conductor software from the Cirrus website. This software allows the user to create custom designs that can be downloaded to the CobraNet chip. However, it should be noted that DSP Conductor only loads the design into RAM within the CobraNet part. When the device is turned off, the design will be lost. The CDK-8 is capable of retaining customized designs but in order to do so, those customizations have to be part of the firmware. Please contact [email protected] to discuss possible options.

For an example of a customized solution, then take a look at the Attero Tech VoiceBox 4 I/O which contains a customized CDK-8 and comes with a PC application called the Attero Tech Control Center to modify the audio control parameters and save all the settings.

All CobraNet IC’s including the ones used on the CDK-8’s can retain all of the common CobraNet variables such as bundle numbers during power off by setting the "persistence" parameter. However, the persistence parameter does not affect the settings of any of the parameters used by the user DSP in a custom design as there is no way to predict what variables will exist for any given user design. There is a separate method for storing those parameters in the flash so they are not lost. The tools necessary to do this can be obtained via your local Cirrus distributor or your local Cirrus sales representative.

© Attero Tech LLC 2008 2 620-00001-01

CDK-8

Design Guide

2 – Digital Audio Interface Connectivity The audio connector on the CDK-8 contains all the clocks and digital signals needed for up to 8 channels of digital audio as well as connections for the serial bridge interface and various control signals such as a reset input and a watchdog output. The CDK modules also take their power through this connector. Below is a schematic diagram of the audio connector.

26 PIN I/O HEADER (J1)

MCLK 1 2 SCLK 3 4 LRCLK 5 6 DAI 0 7 8 DAO 0 9 10 UART TX 11 12 UART TX OE UART RX 13 14 +3.3V MUTE 15 16 RESET OUT RESET IN 17 18 WATCHDOG EXT PWR- 19 20 EXT PWR+ DAI 1 21 22 DAO 1 DAI 2 23 24 DAO 2 DAI 3 25 26 DAO 3

2.1 – Pin Descriptions

2.1.1 - Audio clocks Signal Type Description CDK_MCLK Output Digital audio master clock generated by the CDK-8 CDK_SCLK Output Digital audio sample clock generated by the CDK-8 Digital audio left/right clock generated by the CDK_LRCLK Output CDK-8.

2.1.2 – Digital audio Signal Type Description

DAI1_DATA0 Input Digital audio input bit stream for channels 1 and 2*

DAI1_DATA1 Input Digital audio input bit stream for channels 3 and 4*

DAI1_DATA2 Input Digital audio input bit stream for channels 5 and 6*

DAI1_DATA3 Input Digital audio input bit stream for channels 6 and 8*

DAO1_DATA0 Output Digital audio output bit stream for channels 1 and 2*

DAO1_DATA1 Output Digital audio output bit stream for channels 3 and 4*

DAO1_DATA2 Output Digital audio output bit stream for channels 5 and 6*

DAO1_DATA3 Output Digital audio output bit stream for channels 7 and 8*

* Digital audio is setup as I2S by default. CobraNet devices also support 2 other SSI formats (see the relevant device manual for details). If one of these is required instead of I2S, an alteration to the default firmware will be needed. Contact [email protected] for more details.

© Attero Tech LLC 2008 3 620-00001-01

CDK-8

Design Guide

2.1.3 – Serial bridge Signal Type Description BRIDGE_UART_RXD Input Serial bridge receive line BRIDGE_UART_TXD Output Serial bridge transmit line Enable transmit (active high) drive for two wire multi-drop BRIDGE_UART_TX_OE Output interface.

2.1.4 – Control Signal Type Description Asserts (active low) during initialization and when a fault is MUTE Output detected or connection to the network is lost.

RESET_IN Active low external reset control for the CDK-8 module. Input

Active low reset output. A combination of the RESET_IN signal RESET_OUT Output and an onboard brown out reset detector. Toggles at 750 Hz nominal rate to indicate proper operation. Period duration in excess of 200ms indicates hardware or WATCHDOG Output software failure has occurred and the interface should be reset. Note that improper operation can also be indicated by short pulses (<100 ns).

2.1.5 – Power Signal Type Description +3.3V Power +3.3V ± 0.3V, 500 mA Typ., 750 mA Max GND Power EXT_PWR+ Output These connections provide the potential to obtain power via the unused pairs of the CAT5 network cable. EXT_PWR- Output

2.2 – Reference design The reference design includes a DAC and an ADC connected to the audio interface of the CDK-8. The CDK-8 is capable of 8 channels, though only 2 are used in the reference design. Electronic copies of the designs can be made available on request.

© Attero Tech LLC 2008 4 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 5 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 6 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 7 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 8 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 9 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 10 620-00001-01

CDK-8

Design Guide

© Attero Tech LLC 2008 11 620-00001-01

CDK-8

Design Guide

This page is intentionally blank

© Attero Tech LLC 2008 12 620-00001-01

CDK-8

Design Guide

3 – HMI Interfacing The HMI interface gives an alternate method of controlling the CobraNet device. To control it will require a host microprocessor or microcontroller. The HMI port on the CobraNet device can be made to run in either Motorola mode or Intel mode. The mode selected should best represent the host processor and hardware being used. However, the mode in no way means only Intel or Motorola (now Freescale) processors can be used.

There are 2 ways of interfacing to the HMI. It may be addressed directly if your processor has an external memory bus or alternately, “bit-banging” GPIO pins. The following sections are design examples and code for both methods.

3.1 – External Memory Bus Example The following example demonstrates how to interface to the CDK-8 HMI interface using the external address and data bus of a host processor, an Atmel ATMega128. The ATMega has a multiplexed address and data bus so the HMI mode is set to Intel mode.

The HMI interface may be located anywhere in the address space of the chosen micro. In our example, the HMI port at address 0xFF00.

3.1.1 – Schematic diagrams The schematics are split into 4 parts. The first part shows the microprocessor. There are then schematics showing the Address decoding and the address latch circuitry. Finally there is the connection to the CDK-8DHMI HMI connector itself. Below is the overall block diagram showing the various sections of the schematic and how they fit together.

© Attero Tech LLC 2008 13 620-00001-01

CDK-8

Design Guide

The schematic below shows the Atmel ATMega128 device.1

The following schematics show the address decoding logic and address latch. .

1 . Note that the signals only show the interfacing signals between the microcontroller and HMI header. For complete Atmel Micro design guides, consult the appropriate datasheets and app notes at www.atmel.com.

© Attero Tech LLC 2008 14 620-00001-01

CDK-8

Design Guide

The final part shows the connections to the HMI header.

3.1.2 – Software notes In order to implement a memory-mapped interface, the software requires little in the way of setup. The main application only needs to call HMI_Init. Once that is done, any HMI port read should use HMI_Peek and any HMI writes should use HMI_Poke.

One external timing variable is required that is not defined within the sample code: g_hmiTimer. In our application, a timer interrupt was used to decrement the variable by one every 10ms if its value was greater than zero.

The example code uses a polling method of reading and writing but the HMI interface also supports an interrupt driven method. This requires the use of the HREQ and HACK signals. These signals are shown on the schematic for completeness but are not used within the example code.

The variables used are defined as follows Uint8_t - 8-bit unsigned integer Uint16_t - 16-bit unsigned integer Uint32_t - 32-bit unsigned integer Int32 – 32-bit signed integer

HMI_BASE is the address location that the HMI port mapped within the AVR’s address space. In our example it is set to 0xFF00.

3.1.3 – Source Code - ‘C’ file //======// File : Hmi.c // // (c) Copyright [2008] Attero Tech, LLC. All rights reserved. // // This source code is Attero Tech, LLC. proprietary and confidential // information. // // Description: // Routines to communicate over the HMI interface to a CDK-8DHMI // //======#include #include #include "common.h" #include "hmi.h"

//------// External Global Variables //------extern volatile Uint8_t g_hmiTimer;

//------// Local Function Prototypes

© Attero Tech LLC 2008 15 620-00001-01

CDK-8

Design Guide

//------static Uint8_t ReadRegister(Uint16_t hmiReg); static Uint32_t ReadLongRegister(void); static void WriteRegister(Uint8_t hmiReg, Uint8_t value); static void WaitForStatusBit(Uint8_t bitValue, Uint8_t initVal); static void MultiplexOp(Uint8_t mux_op); static void TranslateAddress(Uint32_t addr); static void SetAddress(Uint32_t addr);

//------// Local Definitions //------

// access host port hardware #define HMI_BASE 0xFF00 //HMI base memory location

//Message register locations #define MSG_A 0 #define MSG_B 1 #define MSG_C 2 #define MSG_D 3

//Data register locations #define DATA_A 4 #define DATA_B 5 #define DATA_C 6 #define DATA_D 7

#define CVR_TRANSLATE_ADDRESS 0xB3 #define CVR_MULTIPLEX_OP 0xB5

#define MOP_GOTO_TRANSLATION 0

#define TOGGLE_BIT 0x01

#define MAX_TRANS_TRIES 5 //maximum number of times to check for //translation to complete

//------// Function: HMI_Init // // Description: This function performs the required HMI interface // software initialization. // // Returns: N/A // //------void HMI_Init(void) {

// 0 wait states XMCRA = 0x60; MCUCR = 0x80; XMCRB = 0x0; //ensure bus-keeper disabled

} //HMI_Init

© Attero Tech LLC 2008 16 620-00001-01

CDK-8

Design Guide

//------// Function: HMI_Peek // // Description: This function reads a specified HMI address and // returns the data. // // Returns: Uint32_t - data read from address // //------Uint32_t HMI_Peek(Int32_t addr) { Uint32_t tempLong = 0;

SetAddress(addr); tempLong = ReadLongRegister(); // garbage read to clear pipeline tempLong = ReadLongRegister(); // data read return tempLong;

} //HMI_Peek

//------// Function: HMI_Poke // // Description: This function writes an input value to the // specified HMI address // // Returns: N/A // //------void HMI_Poke(Uint32_t addr, Int32_t value) { Uint32_t temp = 0;

SetAddress(addr);

temp = (value >> 24) & 0xFF; WriteRegister(DATA_A, (Uint8_t)temp);

temp = (value >> 16) & 0xFF; WriteRegister(DATA_B, (Uint8_t)temp);

temp = (value >> 8) & 0xFF; WriteRegister(DATA_C, (Uint8_t)temp);

temp = value & 0xFF; WriteRegister(DATA_D, (Uint8_t)temp);

} //HMI_Poke

//------// Function: ReadRegister // // Description: This function returns the 8 bits of data read from // the base HMI address plus an input offset. // // Returns: Uint8_t - data from HMI bus // //------static Uint8_t ReadRegister(Uint16_t hmiReg) { volatile Uint8_t *ptr_host; Uint8_t temp;

ptr_host = (Uint8_t *)(HMI_BASE + hmiReg); temp = *ptr_host;

return temp;

© Attero Tech LLC 2008 17 620-00001-01

CDK-8

Design Guide

} //ReadRegister

//------// Function: ReadLongRegister // // Description: This function returns 4 bytes of data read from // the data registers // // Returns: Uint32_t - data from HMI bus // //------static Uint32_t ReadLongRegister(void) { Uint32_t tempLong = 0; Uint32_t temp = 0;

temp = ReadRegister(DATA_A); temp <<= 24; tempLong |= temp;

temp = ReadRegister(DATA_B); temp <<= 16; tempLong |= temp;

temp = ReadRegister(DATA_C); temp <<= 8; tempLong |= temp;

temp = ReadRegister(DATA_D); tempLong |= temp;

return (tempLong); } //ReadLongRegister

//------// Function: WriteRegister // // Description: Writes given value to a given HMI register // // Returns: N/A // //------static void WriteRegister(Uint8_t hmiReg, Uint8_t value) { Uint8_t *ptr_host;

ptr_host = (Uint8_t *)(HMI_BASE + hmiReg); *ptr_host = value;

} //WriteRegister

//------// Function: WaitForStatusBit // // Description: Waits up to 10mS for a given status bit to change // // Returns: N/A // //------static void WaitForStatusBit(Uint8_t bitVal, Uint8_t initVal) { Uint8_t temp = 0; Uint8_t numTries = 10; Uint8_t statusBit = 1;

© Attero Tech LLC 2008 18 620-00001-01

CDK-8

Design Guide

while((1 == statusBit) && (0 < numTries)) { //Wait at least 10ms g_hmiTimer = 2; while(g_hmiTimer){;}

temp = ReadRegister(MSG_D) & bitVal; if(temp != initVal) { statusBit = 0; } numTries--; }// end while

} //WaitForStatusBit

//------// Function: MultiplexOp // // Description: Set up the multiplex register // // Returns: N/A // //------static void MultiplexOp(Uint8_t mux_op) { Uint8_t temp = 0;

WriteRegister(MSG_C, mux_op);

// get present state of toggle bit temp = ReadRegister(MSG_D) & TOGGLE_BIT;

// send command WriteRegister(MSG_D, CVR_MULTIPLEX_OP);

// wait for toggle bit to change state WaitForStatusBit(TOGGLE_BIT, temp);

} //Multiplex_Op

//------// Function: TranslateAddress // // Description: Breaks apart the 4 byte address into bytes for message // registers A through D. // // Returns: N/A // //------static void TranslateAddress(Uint32_t addr) { Uint32_t tempLong = 0; Uint8_t temp = 0;

// write MSB of 3 byte address into HMI reg 0 tempLong = (addr & 0xFF0000) >> 16; temp = (Uint8_t)(tempLong); WriteRegister(MSG_A, temp);

// write middle byte of 3 byte addr into HMI reg 1 tempLong = (addr & 0xFF00) >> 8; temp = (Uint8_t)(tempLong); WriteRegister(MSG_B, temp);

// write LSB of 3 byte address into HMI reg2

© Attero Tech LLC 2008 19 620-00001-01

CDK-8

Design Guide

temp = (Uint8_t)(addr & 0xFF); WriteRegister(MSG_C, temp);

// get state of toggle bit before sending command temp = ReadRegister(MSG_D) & TOGGLE_BIT;

// write register d to actually send command WriteRegister(MSG_D, CVR_TRANSLATE_ADDRESS);

// wait for toggle bit to change WaitForStatusBit(TOGGLE_BIT, temp);

} //Translate_Address

//------// Function: SetAddress // // Description: Sets address to read/write to // // Returns: N/A // //------static void SetAddress(Uint32_t addr) {

TranslateAddress(addr); MultiplexOp(MOP_GOTO_TRANSLATION);

} //Set_Address

3.1.4 – Source code - header file #ifndef HMI_H #define HMI_H

//======// File : HMI.h // // (c) Copyright [2008] Attero Tech, LLC. All rights reserved. // // This source code is Attero Tech, LLC. proprietary and confidential // information. // // Description: // Header file for HMI.c // //======

//------// Function Prototypes //------Uint32_t HMI_Peek(Int32_t); void HMI_Poke(Uint32_t, Int32_t); void HMI_Init(void);

#endif

© Attero Tech LLC 2008 20 620-00001-01

CDK-8

Design Guide

3.2 – GPIO Port Example The following examples demonstrate how to interface to the CDK HMI using a “bit-banged” approach. This approach helps facilitate designs where an external memory bus may not be available on the target microcontroller. The example makes use of the Motorola–mode interface, but it should be noted that the Intel-mode interface could also be used given that all timing requirements are met and the appropriate interface signals are used.

3.2.1 – Schematic diagram The schematic below shows the Motorola–mode hardware interface between a Luminary Micro device and the CDK-8 HMI header.2

2 . Note that all signals shown are simply for interfacing examples between the microcontroller and HMI header, for Luminary Micro design guides consult the appropriate datasheets and app notes at www.luminarymicro.com.

© Attero Tech LLC 2008 21 620-00001-01

CDK-8

Design Guide

3.2.2 – Software notes The following routines implement the required register transactions required to read and write data through the CobraNet Host Management interface. The basic process for reading and writing data is fully described in section 7.1 of the CobraNet Hardware User’s Manual v2.3. The source code provides HMI read and write functionality which can be incorporated into an end product’s own application code.

In order to implement a “bit banged” interface, the software must appropriately configure the hardware by setting up the desired ports and their respective I/O functions.

The variables used are defined as follows Boolean_t – An 8-bit unsigned integer that holds a 0 for FALSE or a 1 for TRUE. Uint16_t - 16-bit unsigned integer Uint32_t - 32-bit unsigned integer Int32 – 32-bit signed integer

The following code examples are a reference for “bit-banging” the HMI interface in accordance with the previously described hardware interface. All examples utilize the Luminary Micro, Stellaris Driver Library API for device configuration.

© Attero Tech LLC 2008 22 620-00001-01

CDK-8

Design Guide

3.2.3 – HMI Setup and Initialization //------// Function: HMIInit // // Description: This function initializes the HMI interface signals. // // Returns: N/A // //------void HMIInit(void) {

// Enable the peripheral used. SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOD);

// Set HDS, HEN and HRW pins as output GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_1, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_2, GPIO_DIR_MODE_OUT); GPIODirModeSet(GPIO_PORTB_BASE, GPIO_PIN_3, GPIO_DIR_MODE_OUT);

// Enable processor interrupts. IntMasterEnable();

} //HMIInit

3.2.4 – HMI Driver – Header file #ifndef _HMI_H_ #define _HMI_H_ //======// File Name: hmi.h // // (c) Copyright [2007] Attero Tech, LLC. All rights reserved // // This source code is Attero Tech, LLC. proprietary and confidential // information. // // Description: // This is the Host Management Interface (HMI) driver header file. // //======

#define MSG_A 0 #define MSG_B 1 #define MSG_C 2 #define MSG_D 3 #define DATA_A 4 #define DATA_B 5 #define DATA_C 6 #define DATA_D 7 #define CONTROL 8 #define HMI_STATUS 9

#define TOGGLE_BIT 0x01

#define CVR_TRANSLATE_ADDRESS 0xB3 #define CVR_INTERRUPT_ACK 0xB4 #define CVR_MULTIPLEX_OP 0xB5

#define MOP_GOTO_TRANSLATION 0 #define MOP_GOTO_TRANSLATION_READ 0 #define MOP_GOTO_TRANSLATION_WRITE 5 #define MOP_GOTO_PACKET_RECEIVE 1 #define MOP_GOTO_PACKET_TRANSMIT 6 #define MOP_GOTO_COUNTERS 2

© Attero Tech LLC 2008 23 620-00001-01

CDK-8

Design Guide

#define MOP_PACKET_TRANSMIT 3 #define MOP_PACKET_RECEIPT 4 #define MOP_IDENTIFY 7

#define MSG_TOGGLE_B0 0 #define MSG_RXPACKET_B0 1 #define MSG_TXPACKET_B0 2 #define MSG_TRANSLATION_B0 3 #define MSG_WRITABLE_B0 4 #define MSG_LENGTH_B0 8

#define MAX_TRANS_TRIES 5 //maximum number of times to check //for translation to complete

//************************************* #define NO_ERROR 0 #define ERR_INVALID_ADDR 1 #define ERR_TRANSLATE_TIMEOUT 2 #define LOOP_15_US 1200

#endif

3.2.5 – HMI Driver – ‘C’ code //======// File Name: hmi.c // // (c) Copyright [2007] Attero Tech, LLC. All rights reserved // // This source code is Attero Tech, LLC. proprietary and confidential // information. // // Description: // This is the Host Management Interface (HMI) driver module. // //======#include "../inc/hmi_translate.h" #include "../inc/hw_types.h" #include "../inc/gpio.h" #include "../inc/hw_memmap.h" #include "../inc/hmi.h"

#define ADD_NANOSEC_DELAY() //Add functionality here to introduce delay //in nanoseconds #define ADD_MICROSEC_DELAY(delay) //Add functionality here to introduce delay //in microseconds

// static prototypes static Uint8_t ReadRegister(Uint32_t); static Uint32_t ReadRegisterLong(void); static void WriteRegister(Uint8_t, Uint8_t); static void MultiplexOp(Uint8_t); static void TranslateAddress(Uint32_t); static void SetAddress(Uint32_t); static Boolean_t HmiResponseTimer(Uint8_t initVal); static void HmiWriteAddr(Uint8_t); void HmiDriver(void);

Uint32_t HmiPeek(Uint32_t addr); void HmiPoke(Uint32_t addr, Uint32_t value);

//------// Function: ReadRegister // // Description: This function returns the 8 bits of data read from // the base HMI address plus an input offset. //

© Attero Tech LLC 2008 24 620-00001-01

CDK-8

Design Guide

// Returns: Uint8_t - data from HMI bus // //------static Uint8_t ReadRegister(Uint32_t hmiReg) { Uint32_t count; Uint8_t temp; Int32_t data = 0; Uint32_t pins = 0xFF; // GPIO_PIN_0 thru GPIO_PIN_7 volatile Uint32_t cnt;

// set PORTD pins 0-7 as input GPIODirModeSet(GPIO_PORTD_BASE, pins, GPIO_DIR_MODE_IN);

// set address HmiWriteAddr((Uint8_t)hmiReg);

// wait max of 19ns for data to be valid ADD_NANOSEC_DELAY(19);

// Set HR/W-N high for read GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_3, GPIO_PIN_3);

// wait max of 19ns for data to be valid ADD_NANOSEC_DELAY(19);

// set HEN-N low GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_2, 0);

// set HDS-N low GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1, 0);

// wait max of 19ns for data to be valid ADD_NANOSEC_DELAY(19);

// read data data = GPIOPinRead(GPIO_PORTD_BASE, pins);

// set HDS-N high GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1, GPIO_PIN_1);

// set HEN-N high GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_2, GPIO_PIN_2);

// ensure at least 15 micro seconds between consecutive reads ADD_MICROSEC_DELAY(15);

// return contents of register temp = (Uint8_t)data;

return (temp);

} //ReadRegister

//------// Function: ReadRegisterLong // // Description: This function returns 4 bytes of data read from // the data registers // // Returns: Uint32_t - data from hmi bus // //------static Uint32_t ReadRegisterLong(void) { Uint32_t tempLong = 0; Uint32_t temp = 0;

© Attero Tech LLC 2008 25 620-00001-01

CDK-8

Design Guide

// read register A byte and pack into long variable temp = ReadRegister(DATA_A); temp <<= 24; tempLong |= temp;

// read register B byte and pack into long variable temp = ReadRegister(DATA_B); temp <<= 16; tempLong |= temp;

// read register C byte and pack into long variable temp = ReadRegister(DATA_C); temp <<= 8; tempLong |= temp;

// read register D byte and pack into long variable temp = ReadRegister(DATA_D); tempLong |= temp;

// return long variable return (tempLong);

} //ReadRegisterLong

//------// Function: WriteRegister // // Description: This function writes the 8 bits of data to the base // HMI address plus an input offset. // // Returns: N/A // //------static void WriteRegister(Uint8_t hmiReg, Uint8_t data) { Uint32_t count = 0; Uint32_t pins = 0xFF; // GPIO_PIN_0 thru GPIO_PIN_7 volatile Uint32_t cnt;

// set PORTD pins 0-7 as output GPIODirModeSet(GPIO_PORTD_BASE, pins, GPIO_DIR_MODE_OUT);

// set address HmiWriteAddr((Uint8_t)hmiReg);

// Set HR/W-N low for write GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_3, 0);

// set HEN-N low GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_2, 0);

// write data to pins GPIOPinWrite(GPIO_PORTD_BASE, pins, data);

// wait min of 24nS ADD_NANOSEC_DELAY(24);

// set HDS-N low GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1, 0);

// wait min of 24nS ADD_NANOSEC_DELAY(24);

// set HDS-N high GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_1, GPIO_PIN_1);

// set HEN-N high GPIOPinWrite(GPIO_PORTB_BASE, GPIO_PIN_2, GPIO_PIN_2);

© Attero Tech LLC 2008 26 620-00001-01

CDK-8

Design Guide

// ensure at least 15 micro seconds between consecutive writes ADD_MICROSEC_DELAY(15);

} //WriteRegister

//------// Function: MultiplexOp // // Description: This function sends the HMI operational command. // // Returns: N/A // //------static void MultiplexOp(Uint8_t mux_op) { Boolean_t timer_expired = FALSE; Uint8_t toggle_bit_val = 0;

WriteRegister(MSG_C, mux_op);

// get present state of toggle bit toggle_bit_val = ReadRegister(MSG_D) & TOGGLE_BIT;

// send command WriteRegister(MSG_D, CVR_MULTIPLEX_OP);

// wait for toggle bit to change state timer_expired = HmiResponseTimer(toggle_bit_val);

// if the timer has expired before the bit toggled then if(timer_expired) {

//Insert code here if required to manage failure

} // end if [( timer_expired )]

} //MultiplexOp

//------// Function: TranslateAddress // // Description: This function breaks apart the 4 byte address into // bytes for msg regs a-d. // // Returns: N/A // //------static void TranslateAddress(Uint32_t addr) { Boolean_t timer_expired = FALSE; Uint32_t tempLong = 0; Uint8_t temp = 0; Uint8_t toggle_bit_val = 0;

// write MSB of 3 byte address into HMI reg 0 tempLong = (addr & 0xff0000) >> 16; temp = (Uint8_t)(tempLong); WriteRegister(MSG_A, temp);

// write middle byte of 3 byte addr into hmi reg 1 tempLong = (addr & 0xff00) >> 8; temp = (Uint8_t)(tempLong); WriteRegister(MSG_B, temp);

// write LSB of 3 byte address into HMI reg2

© Attero Tech LLC 2008 27 620-00001-01

CDK-8

Design Guide

temp = (Uint8_t)(addr & 0xff); WriteRegister(MSG_C, temp);

// get state of toggle bit before sending command toggle_bit_val = ReadRegister(MSG_D) & TOGGLE_BIT;

// write register d to actually send command WriteRegister(MSG_D, CVR_TRANSLATE_ADDRESS);

// wait for toggle bit to change state timer_expired = HmiResponseTimer(toggle_bit_val);

// if the timer has expired before the bit toggled then if(timer_expired) {

//Insert code here if required to manage failure

} // end if [( timer_expired )]

} //TranslateAddress

//------// Function: SetAddress // // Description: This function sets the destination address of the HMI // command. // // Returns: N/A // //------static void SetAddress (Uint32_t addr) { // translate address to format it correctly TranslateAddress(addr);

// send formatted address MultiplexOp(MOP_GOTO_TRANSLATION);

} //SetAddress

//------// Function: HmiPeek // // Description: This function reads a specified HMI address and // returns the data. // // Returns: Uint32_t - data read from address // //------Uint32_t HmiPeek(Uint32_t addr) { Uint32_t hmi_peek_data = 0;

// set the address of the HMI variable SetAddress(addr);

// read the HMI variable -- requires one garbage read to clear pipeline //and one valid data read to get the real data hmi_peek_data = ReadRegisterLong(); hmi_peek_data = ReadRegisterLong();

// return the HMI variable contents return (hmi_peek_data);

} //HmiPeek

© Attero Tech LLC 2008 28 620-00001-01

CDK-8

Design Guide

//------// Function: HmiPoke // // Description: This function writes an input value to the // specified HMI address. // // Returns: N/A // //------void HmiPoke(Uint32_t addr, Uint32_t value) { Uint32_t hmi_poke_data = 0;

// set the address of the HMI variable SetAddress(addr);

// write the first byte of the HMI variable hmi_poke_data = (value >> 24) & 0xFF; WriteRegister(DATA_A, (Uint8_t)hmi_poke_data);

// write the second byte of the HMI variable hmi_poke_data = (value >> 16) & 0xFF; WriteRegister(DATA_B, (Uint8_t)hmi_poke_data);

// write the third byte of the HMI variable hmi_poke_data = (value >> 8) & 0xFF; WriteRegister(DATA_C, (Uint8_t)hmi_poke_data);

// write the fourth byte of the HMI variable hmi_poke_data = value & 0xFF; WriteRegister(DATA_D, (Uint8_t)hmi_poke_data);

} //HmiPoke

//------// Function: HmiResponseTimer // // Description: This function waits up to 1 second for the toggle bit // to change indicating processing of message complete. // // Returns: Boolean_t timer_expired -- expired = TRUE, not expired = FALSE. // //------static Boolean_t HmiResponseTimer(Uint8_t initVal) { Boolean_t timer_expired = FALSE; Uint32_t numTries = 1000; Uint8_t toggleBit = 1; Uint8_t toggle_bit_val = 0;

// while the toggle bit is still the same and number of tries is // positive while((toggleBit == 1) && (numTries > 0)) { // read message register D and determine toggle bit state toggle_bit_val = ReadRegister(MSG_D) & TOGGLE_BIT;

// if toggle bit has changed and is not the same as the initial // passed in value then if(toggle_bit_val != initVal) { // change toggle bit to 0 to signal end of loop – message // processed toggleBit = 0; } // end if [( temp != initVal )]

numTries--;

© Attero Tech LLC 2008 29 620-00001-01

CDK-8

Design Guide

} // end while [( (toggleBit == 1) && (numTries > 0) )]

// if the toggle bit has not changed then if(toggleBit) { // the timer has expired (maxed out) before the message was // processed timer_expired = TRUE; } else { // the timer has not expired (maxed out) before the message was // processed timer_expired = FALSE; } // end if [( toggleBit )]

// return the timer expiration status flag return timer_expired;

} //HmiResponseTimer

//------// Function: HmiWriteAddr // // Description: This function sets the HMI address bus to the // specified address using the Stellaris Peripheral // Driver Library GPIO API. // // Returns: N/A // //------static void HmiWriteAddr (Uint8_t addr) { Uint32_t pins = 0x3C; // GPIO_PIN_2 thru GPIO_PIN_5

// set PORTA pins 2,3,4,5 as output GPIODirModeSet(GPIO_PORTA_BASE, pins, GPIO_DIR_MODE_OUT);

// write address to pins GPIOPinWrite(GPIO_PORTA_BASE, pins, ((addr & 0x0F) << 2));

} //HmiWriteAddr

© Attero Tech LLC 2008 30 620-00001-01

CDK-8

Design Guide

This page is intentionally blank

© Attero Tech LLC 2008 31 620-00001-01

CDK-8

Design Guide

4 – PCB Design Guidelines In order to ensure the best signal integrity and minimize EMI radiation problems, adhere to the following guidelines when designing your PCB.

4.1 – Power Supply It is recommended that bypass capacitors be placed near +3.3V power pin (pin 12) to reduce the AC signal return path. A 0.1uF capacitor in parallel with a 10uF-47uF electrolytic between +3.3V and ground are suggested.

4.2 – Clock Termination All audio clock sources should be terminated with series source termination resistors to minimize ringing. In general, a value of 75 to 100 Ohms has been determined to provide adequate source termination without causing any adverse effects. The audio clocks should be routed as direct and short as possible, ideally without any vias. If vias are required, keep the number of vias to a minimum.

4.3 – Clock signal parallel end termination In designs where the clock signals are long by necessity, thought should be given to terminating the lines. In general this should be with a small capacitor (in the order of 1000pF or smaller) in series with a small resistor (around 75 ohms) between the clock and ground. The precise values used will depend on the trace impedance of the terminated trace.

4.4 – Grounding It is imperative that the ground plane referenced by any of the clocks interfacing to the CDK module, be located below the signal trace. In other words, avoid any discontinuities or cutouts in the ground plane when clock signals over the plane. This helps to minimize the total loop area of the signal and reduces the overall affects of EMI.

4.5 – Signal Separation Any clocks should be adequately separated. Parallel routing of the signals for significant distances should also be avoided. In some cases, space requirements may force the clocks to be routed in near proximity, in this case it is also recommended that the signal ground be poured between the clock traces on the signal layer to provide isolation between the clocks and minimize signal coupling from trace to trace.

4.6 – Chassis Grounding Due to the various clock signals required to implement a CobraNet interface, it is imperative that chassis grounding be given consideration for integration into end products. The CDK module has a chassis ground connection through the lower right mounting hole. A solid galvanic connection to the main chassis ground/enclosure is effective in helping to reduce emissions. This should be especially noted for any device requiring regulated emissions certification.

© Attero Tech LLC 2008 32 620-00001-01

CDK-8

Design Guide

5 – End Product Bring-up hints Basic functionality can be tested, before integrating into the target product by applying a regulated and current limited +3.3V power supply between J1 pin 14 (+3.3V) and J1 pin 10 (Gnd).

Follow these steps to verify functionality: o Connect a CAT-5 Ethernet cable between an Ethernet switch and the RJ-45 connector on the CDK-8 o Connect a PC to the same Ethernet switch o Apply power to the CDK-8 o Assign a static IP address to your network interface card on the PC o Start the CobraNet Discovery application

You now should be able to monitor and manipulate the CDK-8 module using the CobraNet Discovery application. By connecting a second CobraNet device to the same network will allow audio and data transmission to be configured between the devices.

5.1 – Power Supplies o Check power supplies to ensure CDK is correctly powered. o 3.3V power needs to be within +/-10% at the module pin

5.2 – Clocks and I2S lines o Check for the presence of clocks from the CDK-8 to the DAC’s and ADC’s. o Check frequency of clocks. The default frequencies are LRCLK = 48kHz, SCLK = 3.072Mhz and MCLK=24.576Mhz. o Check integrity of the clocks to ensure a reasonable square wave at the ADC and DAC’s. A jittery or very rounded clock signal will give poor audio performance. o With the clocks correct, data should be seen on the incoming I2S lines to the CDK-8. The outgoing I2S lines will show nothing unless audio is routed to the local outputs.

5.3 – Ethernet LED activity Under normal operating conditions, the LED will work as follows. o With only a single CobraNet device on a network, the both LED’s will be on and the left one will flash occasionally. o If a second CobraNet is attached, the left LED will begin flashing at around 3 times a second. The right LED shows whether the device is a conductor or not. If the light is on, the device is the conductor. If it is off, it is not the conductor. Only one device may the conductor in a single CobraNet network.

© Attero Tech LLC 2008 33 620-00001-01

CDK-8

Design Guide

APPENDIX A – CDK-8DUART SHMI message protocol

A1 – Terminology The following table describes abbreviations, acronyms and technical terms used.

Term Meaning ACK Positive Acknowledgement NACK Negative Acknowledgement API Application Programming Interface ASCII American Standard Code for Information Interchange HMI Host Management Interface SHMI Serial Host Management Interface IP bps Bits Per Second MAC Media Access Controller

MI Management Interface SCI Serial Communications Interface SSI Synchronous Serial Interface

© Attero Tech LLC 2008 A-1 620-00001-01

CDK-8

Design Guide

A2 – System Description The CDK-8DUART extends the current CDK-8DHMI to provide a friendly user interface. It provides a straightforward CobraNet solution integration path, allowing the user to request information and set parameters via a serial port. The CDK- 8DUART enables the user to easily add CobraNet capability to a given system. This system will use the 32-bit CobraNet Management Interface (MI) format. This system will enable a user to use an application (such as HyperTerminal, for example) to send American Standard Code for Information Interchange (ASCII) commands to request CobraNet information and set CobraNet parameters without having to know the details of the variable addresses

Figure A2-1 - System Block Diagram

The data flow starts from the user application. This can be any device capable of generating an RS232 serial signal such as a PC or a dedicated micro. The application generates a serial message containing a read or a write command. The CDK- 8DUART translates the serial message and if valid, passes on the command to the CobraNet node via the HMI interface.

The CDK-8DUART then converts the response from the CobraNet node from the HMI into a serial message and passes the serial message back to the user application. The actual

© Attero Tech LLC 2008 A-2 620-00001-01

CDK-8

Design Guide

A3 – Serial Format The CDK-8DUART UART interface configuration uses 8 data bits, no parity bit, 1 stop bit and no flow control at a default baud rate of 57,600 bits per second (bps). Of those parameters, only the baud rate can be changed. Acceptable values for the baud rate are 9600, 19200, 38400, 57600 and 115200 bps.

A3.1 – Message Format The message protocol consists of a read message, a write message, and messages that can access a selected subset of the most commonly customized CobraNet MI variables. The messages all use ASCII characters to make it user-friendly and easy to use. Using ASCII also maximizes compatibility with applications that require printable ASCII characters like HyperTerminal, for example.

The messages can be characterized into the following main types: 1) Read variable messages. 2) Write variable messages. 3) Read response messages. 4) Write response messages. 5) Baud rate change message.

The read and write message formats follow the same basic structure. A read or write command is given first followed by the CobraNet MI variable data. Commands and each subsequent data field must be separated by a space (designated by its ASCII hex value of 0x20). The message is completed with a carriage return (ASCII character 0x0A or ) or a line feed (ASCII character 0x0D or ) or both. Only a single value can be read or written at a time.

The variable being written or read can be referenced in two different ways. The first is to use the CobraNet MI variable name. The second method uses the variables address as an ASCII hexadecimal number (without the “0x” notation) such as 100400.

A list of the variable names supported is listed in Table A-12. The list also gives the variables hexadecimal addresses as well. Both methods are acceptable and both are shown in the following examples. However, it should be noted that only the most commonly used CobraNet MI variables are supported by name. If access to a non-supported variable is required, the address method must be used. All the address locations can be found in the CobraNet Programmer’s Reference (by Cirrus Logic), Version 2.5 in the “Host Address” field of the CobraNet MI variable table.

There are a number of different data types when writing or reading data. The table below lists the data formats and the format in which they are read or written.

Data type Format String “ABCDEF” Integer “33” PhysAddress (MAC Address) “01:02:03:04:05:06 IPAddress “1.2.3.4”

Table A-1 - Serial message data types

© Attero Tech LLC 2008 A-3 620-00001-01

CDK-8

Design Guide

A3.2 – Read Messages The general read message structure conforms to the format specified in Table A-2 below.

Message Command CobraNet MI Variable Terminator 0x0D ReadVar 0x20 sysLocation 0x0A 0x0D ReadAddr 0x20 100400 0x0A

Table A-2 - Read Request Message Format

Example: ReadVar sysLocation or ReadAddr 100400

If the variable name is used then occasionally, depending on the variable being read, additional parameters may be required. For instance, the variable may require a receiver number, as used by the rxBundle variable, or a receiver number and an audio channel number, as used by the rxSubMap variable. These parameters are simply added to the message after the variable name separated by a space.

Example: ReadVar rxSubMap 1 2

The order the parameters appear in is vitally important if a variable has more than 1 parameter. Information on what variables are accessible and what parameters a needed for each are listed in the variables details section.

If the variable address is used then that’s the only value required as each parameter of a CobraNet MI variable has its own address.

A3.2.1 – Read Message Response If the variable is successfully read, the data is passed back to the user application. The format of the response is shown in Table A-3 below.

Message CobraNet Message Value Command MI Variable Terminator 0x0D ReadVarRsp 0x20 sysLocation 0x20 “telephone closet, 3rd floor” 0x0A 0x0D ReadAddrRsp 0x20 100400 0x20 “telephone closet, 3rd floor” 0x0A

Table A-3 – Successful Read Response Message Formats

Example: ReadVarRsp sysLocation “telephone closet, 3rd floor” or ReadAddrRsp 100400 “telephone closet, 3rd floor”

If the request fails for any reason, the response will be a NACK message. The format of the NACK message is shown below in Table A-4.

NACK Reason Message

Code Terminator

0-9 & A-D 0x20 Nack 0x0D 0x0A

Table A-4 - Read NACK Message Format

Example: D Nack

The NACK response code gives an indication of the reason for the failure. A table of the reason codes and a description of each is shown in Table A-11.

© Attero Tech LLC 2008 A-4 620-00001-01

CDK-8

Design Guide

A3.3 – Write Messages The write message structure is very similar to the read message structure except it includes the new value contained within quotation marks. The format is specified in Table A-5 below.

Message CobraNet Message New Value Command MI Variable Terminator 0x0D WriteVar 0x20 sysLocation 0x20 “telephone closet, 3rd floor” 0x0A 0x0D WriteAddr 0x20 100400 0x20 “telephone closet, 3rd floor” 0x0A

Table A-5 –Write Request Message Format

Example: WriteVar sysLocation “telephone closet, 3rd floor” or WriteAddr 100400 “telephone closet, 3rd floor”

As with the read process, if the variable name is used then occasionally, depending on the variable being written, additional parameters may be required.

Example: WriteVar rxSubMap 1 2 “33”

Note only the data to be written is contained within quotation marks. Again, as with the read process, if the address is used then that’s the only value required as each parameter of a CobraNet MI variable has its own address.

A3.3.1 – Write Message Response If the variable is successfully written, a simple Ack message is returned. The format of the response is shown in Table A-6 below.

Message

Terminator 0x0D Ack 0x0A

Table A-6 – Successful Write Response Message Format

Example: Ack

If the write request fails for any reason, the response will be a NACK message. This message has the same format as the read Nack message and is repeated below.

NACK Reason Message

Code Terminator 0-9 & A-D 0x20 Nack 0x0D 0x0A

Table A-7 - Write NACK Message Format

Example: D Nack

The NACK response code gives an indication of the reason for the failure. A table of the reason codes and a description of each is shown in Table A-11.

© Attero Tech LLC 2008 A-5 620-00001-01

CDK-8

Design Guide

A3.4 – Baud Rate Change Message Use this message when the baud rate of the device needs to be changed. When the baud rate change message is received by the CDK-8DUART, the baud rate change to the new value will be done if both 1) the value is different from the current one and 2) the value is a valid supported baud rate (9600, 19200, 38400, 57600, or 115200 bps).

Note that the baud rate value does not include a comma.

Message New Baud Message

Command Rate Terminator 0x0D ChangeBaudRate 0x20 19200 0x0A

Table A-8 - Baud Rate Change Request Message

Example: ChangeBaudRate 19200

If the baud rate change request satisfies both conditions noted above, the Ack response message (see Table A-9) will be transmitted at the original baud rate. Any further messages should then be sent at the new baud rate.

Message

Terminator

0x0D Ack 0x0A

Table A-9 – Successful Baud Rate Change Message Format

Example: Ack

If either condition 1 or 2 above are not satisfied, the Nack response message will be sent. No baud rate change will occur and further messages will be processed at the original baud rate

NACK Reason Message

Code Terminator 0-9 & A-D 0x20 Nack 0x0D 0x0A

Table A-10 - Write NACK Message Format

Example: D Nack

A3.5 – NACK Response Descriptions

NACK Reason NACK Reason Code 0 Receive buffer overflow (send commands slower) 1 Transmit buffer overflow (unable to send response quickly enough) 2 Unsupported CobraNet Address received 3 Invalid counter type, IP address, timer ticks value, MAC address, or attempt to write to read only value. 4 Attempt to read write only value 5 Unknown CobraNet Address received 6 Timeout waiting for CobraNet read response 7 Timeout waiting for CobraNet write response

© Attero Tech LLC 2008 A-6 620-00001-01

CDK-8

Design Guide

8 – 9 Reserved A – C Reserved D Invalid Command Variable or Address E – Z Reserved

Table A-11 – NACK Reason Codes

© Attero Tech LLC 2008 A-7 620-00001-01

CDK-8

Design Guide

A4 – Commands & Responses The CDK-8DUART’s serial protocol processes a list of CobraNet MI variables by name. These are shown below.

Variable CobraNet Address Type Name (hexadecimal)

sysDescr Read 100000

sysContact Read/Write 100200

sysName Read/Write 100300

sysLocation Read/Write 100400

ifPhysAddress Read 11000D

flashPersistEnable Read/Write 1100

errorCode Read 2002

errorCount Read 2003

modeRateControl Read/Write 2100

conductorStatus Read 11000

serialFormat Read/Write 24000

serialBaud Read/Write 24001

serialRxMAC Read/Write 24003

serialTxMAC Read/Write 24100

rxSubFormat Read/Write 4n30m (see section A4.16)

rxBundle Read/Write 4n100 (see section A4.17)

rxSubMap Read/Write 4n20m (see section A4.18)

txBundle Read/Write 5n100 (see section A4.19)

txSubCount Read/Write 5n105 (see section A4.20)

txUnicastMode Read/Write 5n107 (see section A4.21)

txMaxUnicast Read/Write 5n108 (see section A4.22)

txSubMap Read/Write 5n20m (see section A4.23)

txSubFormat Read/Write 5n30m (see section A4.24)

ipMonCurrentIP Read/Write 72000

procMode Read/Write 75100

stdUserVersionMajor Read/Write 7E000

stdUserVersionMinor Read/Write 7E001

stdUserString Read/Write 7E100, 7E116, 7E12C, 7E142 (see section A4.29)

stdUserInteger Read/Write 7E300 - 7E340 (see section A4.30)

Table A-12 – CobraNet MI Variable Names and their Addresses

© Attero Tech LLC 2008 A-8 620-00001-01

CDK-8

Design Guide

The variable definitions for the above supported named variables can be found in sections A4.2 to A-17. Further details of all CobraNet MI variables are listed in the CobraNet Programmer’s Reference (by Cirrus Logic), Version 2.5. Only the 32-bit format definitions are be used (as opposed to the available 24-bit format).

A4.1 – Legend Variable Name Name of variable Description Description of the variable including allowed values and usage discussion. HMI addresses are used to access variables via the host port. HMI addresses Host Address have a 24 bit range on both 24- and 32- bit platforms. Only visible for variables that require one or more parameters when reading Parameter or writing using the variable name. It lists the parameters that are needed and the order they need to be in. Size is indicated for String variables only. It shows the number of characters Size available for that string. Type The data type of the variable Read-only variables can only be read and can not be modified. Read/Write variables can be read and written. Read/Write-Persistent variables can be Attributes read and written. If the persistence feature is enabled, values of these variables will automatically be written to flash for recall at startup.

A4.2 – sysDescr Variable Name sysDescr Product description. Includes Manufactures name and product part number Description as well as the CobraNet base firmware version. Host Address 100000 Size 84 characters Type String Attributes Read-Only

A4.3 – sysContact Variable Name sysContact Description Contact details for the person responsible for this node. Host Address 100200 Size 60 characters Type String Attributes Read/Write Persistent

A4.4 – sysName Variable Name sysName A name assigned to this managed node. By convention, this is the node's Description fully qualified domain name. Host Address 100200 Size 60 characters Type String Attributes Read/Write Persistent

© Attero Tech LLC 2008 A-9 620-00001-01

CDK-8

Design Guide

A4.5 – sysLocation Variable Name sysLocation Description The physical location of this node (e.g., “telephone closet, 3rd floor”) Host Address 100400 Size 60 characters Type String Attributes Read/Write Persistent

A4.6 – ifPhysAddress Variable Name ifPhysAddress Description The interface's address at the protocol layer. (MAC address) Host Address 11000D Type PhysAddress Attributes Read Only

A4.7 – flashPersistEnable Variable Name flashPersistEnable Non-zero value enables variable persistence feature. Read/write - Persistent Description type variables will be automatically written to non-volatile memory when changed. Values will be restored on power-up. Host Address 1100 Type Integer Attributes Read/Write Persistent

A4.8 – errorCode Variable Name errorCode

Description Last error code reported. Host Address 2002 Type Integer Attributes Read Only

A4.9 – errorCount Variable Name errorCount

Description Number of errors reported during since system up time Host Address 2003 Type Integer Attributes Read Only

© Attero Tech LLC 2008 A-10 620-00001-01

CDK-8

Design Guide

A4.10 – modeRateControl Variable Name modeRateControl Selects and sample rate mode for the interface. 1024 = 1 1/3 ms latency, 48 kHz sample rate 1281 = 1 1/3 ms latency, 96 kHz sample rate Description 1280 = 2 2/3 ms latency, 48 kHz sample rate 1537 = 2 2/3 ms latency, 96 kHz sample rate 1536 = 5 1/3 ms latency, 48 kHz sample rate 1793 = 5 1/3 ms latency, 96 kHz sample rate Host Address 2100 Type Integer Attributes Read/Write Persistent

A4.11 – conductorStatus Variable Name conductorStatus Conductor status: Description 0 - This interface is not the conductor 1 - This interface is the conductor Host Address 11000 Type Integer Attributes Read/Write Persistent

A4.12 – serialFormat Variable Name serialFormat

This variable is used to enable or disable the Serial Communications Interface (aka SCI or Serial Bridge) and to set the data format for both transmit and receive directions. Format may only be changed while the SCI is disabled. It is recommended to set serialFormat to 0, wait at least 100ms then set serialFormat to the desired value with the enable bit set. The SCI can take up to 100ms to recognize a change. This procedure insures that the change is recognized and the port is properly configured.

0x01 - Enable serial . TXD pin is tri-stated when disabled. 0x02 - This bit is ignored. Description 0x04 - Use SCI_SCLK to control transmit enable for multi-drop (RS485) operation. SCI_SCLK is an active high signal; transmitter should be enabled when SCI_SCLK is high. 0x08 - Enable local loopback. This feature is intended primarily for factory test. SCI bridging must also be enabled for loopback to operate. When loopback is enabled, received characters are directed to the SCI transmitter instead of to the network serialRxMAC should be set to 00:00:00:00:00:00 to avoid transmitter contention when loopback is enabled. 0x10 - Accept properly unicast addressed data in addition to data addressed in accordance to serialRxMAC setting. Host Address 24000 Type Integer Attributes Read/Write Persistent

© Attero Tech LLC 2008 A-11 620-00001-01

CDK-8

Design Guide

A4.13 – serialBaud Variable Name serialBaud Baud rate for transmission and reception. The baud rate is specified in bits Description per second. The minimum baud rate is 600 baud. The maximum is 115200bps. Host Address 24001 Type Integer Attributes Read/Write Persistent

A4.14 – serialRxMAC Variable Name serialRxMAC MAC address of the CobraNet Interface from which SCI data will be accepted. Can only be changed when the SCI is disabled (serialFormat bit0 = 0). This may be any though 01:60:2B:FD:00:00 Description through 01:60:2B:FD:FF:FF have been reserved by Cirrus Logic for use as "asynchronous global channels." ifPhysAddress is the only usable unicast address (CobraNet does not support Ethernet promiscuous mode). Host Address 24003 Type PhysAddress Attributes Read/Write Persistent

A4.15 – serialTxMAC Variable Name serialTxMAC MAC address of the CobraNet interface to which serial data is sent. May be Description any multicast or unicast address. n only be changed when the SCI is disabled (serialFormat bit0 = 0) Host Address 24100 Type PhysAddress Attributes Read/Write Persistent

A4.16 – rxSubFormat Variable Name rxSubFormat

Vector of received audio format for each sub-channel.

Audio Format Value (decimal) Resolution Sample Rate Latency

Description 0 No Signal

278,528 16 bit 48 kHz 5 1/3 ms

344,064 20 bit 48 kHz 5 1/3 ms

409,600 24 bit 48 kHz 5 1/3 ms

1,343,488 16 bit 96 kHz 5 1/3 ms

© Attero Tech LLC 2008 A-12 620-00001-01

CDK-8

Design Guide

1,409,024 20 bit 96 kHz 5 1/3 ms

1,474,560 24 bit 96 kHz 5 1/3 ms

270,336 16 bit 48 kHz 2 2/3 ms

335,872 20 bit 48 kHz 2 2/3 ms

401,408 24 bit 48 kHz 2 2/3 ms

1,327,104 16 bit 96 kHz 2 2/3 ms

1,392,640 20 bit 96 kHz 2 2/3 ms

1,458,176 24 bit 96 kHz 2 2/3 ms

266,240 16 bit 48 kHz 1 1/3 ms

331,776 20 bit 48 kHz 1 1/3 ms

397,312 24 bit 48 kHz 1 1/3 ms

1,318,912 16 bit 48 kHz 1 1/3 ms

1,384,448 20 bit 48 kHz 1 1/3 ms

1,449,984 24 bit 48 kHz 1 1/3 ms

Host Address 4n30m (n is 0 based receiver number, m is 0 based audio channel number) 1 – Receiver number (0-7) Parameters 2 – Audio sub-channel number(0-7) Type Integer Attributes Read Only Read Format

A4.17 – rxBundle Variable Name rxBundle Description Receive bundle assignment.

Host Address 4n100 (n is 0 based receiver number) Parameters 1 – Receiver number (0-7) Type Integer16

Attributes Read/Write Persistent

A4.18 – rxSubMap Variable Name rxSubMap Audio routing channel destinations for each audio channel in a received Description bundle. Host Address 4n20m (n is 0 based receiver number, m is 0 based audio channel number) 1 – Receiver number (0-7) Parameters 2 – Audio sub-channel number (0-7) Count 8

© Attero Tech LLC 2008 A-13 620-00001-01

CDK-8

Design Guide

Type Integer Attributes Read/Write Persistent

A4.19 – txBundle Variable Name txBundle Description Transmitter bundle assignment. Host Address 5n100 (n is 0 based transmitter number) Parameters 1 – Transmitter number (0-3) Type Integer16 Attributes Read/Write Persistent

A4.20 – txSubCount Variable Name txSubCount Description Number of audio channels to transmit in a bundle. Host Address 0x5n105 (n is 0 based transmitter number) Parameters 1 – Transmitter number (0-3) Type Integer Attributes Read/Write Persistent

A4.21 – txUnicastMode Variable Name txUnicastMode Specifies the number of unicast destinations served before automatically switching to multicast bundle transmission. 0 - Multicast addressing used at all times. Note: multicast bundles do not transmit data until a receiver is assigned to the same bundle number. Description 1 - 4 - Multicast addressing used to specify number of receivers. 0x7FFFFF - Multicast addressing is never used. Maximum number of unicast destinations is set by txMaxUnicast. Receiver request priority is used to determine which receivers are serviced if multiple receivers are assigned to this bundle. Host Address 5n107 (n is 0 based transmitter number) Parameters 1 – Transmitter number (0-3) Type Integer Attributes Read/Write Persistent

Specifies maximum number of unicast destinations supported simultaneously by the transmitter. Receivers in excess of this setting will not receive the bundle. A transmitter can service up to 4 receivers. The number of unicast destinations transmitted to will never exceed this internal capacity limitation. If txUnicastMode is set lower than txMaxUnicast, the bundle will switch to multicast before the limitation on unicast destinations is reached. If txUnicastMode is set equal to txMaxUnicast, the bundle will switch to multicast when the limitation on unicast destinations is exceeded.

© Attero Tech LLC 2008 A-14 620-00001-01

CDK-8

Design Guide

A4.22 – txMaxUnicast Variable Name txMaxUnicast Specifies maximum number of unicast destinations supported simultaneously by the transmitter. Receivers in excess of this setting will not receive the bundle. A transmitter can service up to 4 receivers. The number of unicast destinations transmitted to will never exceed this Description internal capacity limitation. If txUnicastMode is set lower than txMaxUnicast, the bundle will switch to multicast before the limitation on unicast destinations is reached. If txUnicastMode is set equal to txMaxUnicast, the bundle will switch to multicast when the limitation on unicast destinations is exceeded. Host Address 5n108 (n is 0 based transmitter number) Parameters 1 – Transmitter number (0-3) Type Integer

Attributes Read/Write Persistent

A4.23 – txSubMap Variable Name txSubMap Transmit audio channel (channel within bundle) to audio routing channel Description (channel of SSI) mapping. 5n20m (n is 0 based transmitter number, m is 0 based sub-channel Host Address number) 1 – Transmitter number (0-3) Parameters 2 – Audio sub-channel number (0-7) Type Integer Attributes Read/Write Persistent

A4.24 – txSubFormat Variable Name txSubFormat Specifies data format for each sub-channel in the transmitted bundle.

Audio Format Value (decimal) Resolution Sample Rate Latency

0 No Signal

278,528 16 bit 48 kHz 5 1/3 ms

344,064 20 bit 48 kHz 5 1/3 ms Description 409,600 24 bit 48 kHz 5 1/3 ms

1,343,488 16 bit 96 kHz 5 1/3 ms

1,409,024 20 bit 96 kHz 5 1/3 ms

1,474,560 24 bit 96 kHz 5 1/3 ms

270,336 16 bit 48 kHz 2 2/3 ms

335,872 20 bit 48 kHz 2 2/3 ms

© Attero Tech LLC 2008 A-15 620-00001-01

CDK-8

Design Guide

401,408 24 bit 48 kHz 2 2/3 ms

1,327,104 16 bit 96 kHz 2 2/3 ms

1,392,640 20 bit 96 kHz 2 2/3 ms

1,458,176 24 bit 96 kHz 2 2/3 ms

266,240 16 bit 48 kHz 1 1/3 ms

331,776 20 bit 48 kHz 1 1/3 ms

397,312 24 bit 48 kHz 1 1/3 ms

1,318,912 16 bit 48 kHz 1 1/3 ms

1,384,448 20 bit 48 kHz 1 1/3 ms

1,449,984 24 bit 48 kHz 1 1/3 ms

0x5n30m - 0x5n30m (n is 0 based transmitter number, m is 0 based sub- Host Address channel number) 1 – Transmitter number (0-3) Parameters 2 – Audio sub-channel number (0-7) Type Integer Attributes Read/Write Persistent

A4.25 – ipMonCurrentIP Variable Name ipMonCurrentIP Description The current IP address for the CobraNet interface. Host Address 72000 Type IP Address Attributes Read/Write

A4.26 – procMode Variable Name procMode

Signal processing mode: 0 - Silent Description 1 - Audio pass-through 2 – Running User DSP Configuration

Host Address 75100

Type Integer Attributes Read/Write Persistent

© Attero Tech LLC 2008 A-16 620-00001-01

CDK-8

Design Guide

A4.27 – stdUserVersionMajor Variable Name stdUserVersionMajor Description Major user version number Host Address 7E000 Type Integer Attributes Read/Write Persistent

A4.28 – stdUserVersionMinor Variable Name stdUserVersionMinor Description Minor user version number Host Address 7E001

Type Integer Attributes Read/Write Persistent

A4.29 – stdUserString Variable Name stdUserString Description 4 string variables to store the users string parameters. 7E100 = User String 0 7E116 = User String 1 Host Address 7E12C = User String 2 7E142 = User String 3 Parameter 1 – String number (0-3) Size 60 characters Type String Attributes Read/Write Persistent

A4.30 – stdUserInteger Variable Name stdUserInteger Description 64 integer variables to store the user’s integer parameters. Host Address 7E300 through 7E340 Parameter 1 – Integer Number (0-64) Type Integer Attributes Read/Write Persistent

© Attero Tech LLC 2008 A-17 620-00001-01

CDK-8

Design Guide

APPENDIX B – Introduction to CobraNet CobraNet is an audio networking technology for delivery and distribution of real-time, high quality uncompressed digital audio using a standard Ethernet network. It is implemented using a combination of hardware, firmware and the CobraNet protocol.

Unlike other audio networking or distribution technologies, CobraNet is a true network and exists on standard Ethernet networks using standard Ethernet hardware. Since it is a true network, audio routing is highly flexible between network nodes and can be used in a variety of audio distribution applications.

In addition to the high degree of routing flexibility that CobraNet provides, the technology also incorporates the ability to monitor and control CobraNet devices remotely. This is a key feature that is highly important in fixed installation applications where the audio distribution equipment may not be readily accessible. All CobraNet devices on the network can be controlled and monitored from a central location by sending control commands and monitoring device specific parameters.

CobraNet provides this capability by implementing Simple Network Management Protocol (SNMP). SNMP is a standard protocol typically used for monitoring network devices such as Ethernet switches. In the case of CobraNet, it allows users to communicate with any CobraNet device using standard SNMP tools or a customized user interface designed specifically for CobraNet, such as Attero Tech’s Control Center application.

The figure above represents the types of data that coexist on a CobraNet network.

Before a CobraNet system can be configured, it is important to first understand how CobraNet distributes audio between devices.

Audio is sent in "bundles" on a CobraNet system. Each bundle is capable of holding up to 8 logical audio channels. Every CobraNet device has a number of bundle transmitters and bundle receivers. These transmitters and receivers are the mechanism used to send and receive bundles between devices.

For a transmitted bundle, audio may be sourced from either the local audio inputs of the device or internal audio from the on-board DSP3, but not both simultaneously. Combinations of the local or internal audio may exist within a bundle in any order. Additionally, a single source in a device may be used multiple times in a single transmitter bundle or across multiple transmitter bundles. For a received bundle, the received network audio may be routed to the devices local outputs or the internal DSP* or simply ignored.

Once the contents of a bundle have been decided, the next step is to pass to another CobraNet device. To do this, every CobraNet device has up to 4 bundle transmitters. Each bundle transmitter has a transmit mode that must first be selected. This affects how many devices may receive that particular bundle at a time. The modes are as follows :- o Unicast – Used for one to one connections. In this mode, only one receiver at a time can receive this bundle. Once a link is established from this transmitted bundle to a receiver, any future requests for that bundle will fail.

o Multicast – Used for one to many connections. This mode broadcasts its contents over the entire network. There is no restriction on the number of receivers. However, the downside is the network bandwidth required.

3 Not available on all devices – CS49xxx devices only

© Attero Tech LLC 2008 B-1 620-00001-01

CDK-8

Design Guide

o Multi-unicasts – Another one to many mode. Whilst this is the most efficient method for getting a bundle to multiple receivers in terms of network bandwidth, it requires more processing power on the CobraNet device so in this mode there is a maximum limit of 4 receiver connections (this can be reduced if required). If more connections are required than the limit then the node automatically switches to multicast.

Note: When a bundle must be transmitted to multiple receivers, multi-unicast transmissions should be used where possible.

Once the mode is selected, to enable a device to transmit the bundle, simply allocate the particular transmitter bundle a non-zero number. Since this number identifies all the network packets sent out by that transmitter, each transmit bundle number must be unique on a network4.

Now the transmitter is setup, it’s time to setup the receivers. In order to receive bundles, each CobraNet device has up to 8 bundle receivers. To enable a device to receive a bundle, simply allocate one of that devices bundle receivers the same bundle number as a transmitted bundle. By doing so, a virtual link is created and audio should now be passed from one device to the other. It should be noted that no knowledge of a device’s or connection is thus required in order to configure audio connections. The only restriction to this is that a device cannot be setup to receive a bundle it is also transmitting.

The above case creates a simple, one to one unidirectional link. If more devices are required to receive that bundle then allocate the same transmitted bundle number to a bundle receiver on the other CobraNet devices.

It is also important to note that CobraNet also supports simultaneous bidirectional audio distribution in each device as well. Not only could audio be sent from device A to device B but at the same time, should it be needed, audio could also be sent from device B to device A. The exact bundle and routing configuration will be determined by the needs of each individual installation. An installation may have multiple units transmitting multiple bundles. The only restriction is the bandwidth available on the network to transfer the audio.

CobraNet also has the capability to alter all of the above options in real time making the whole system completely dynamic. By use of control software, all of the bundle assignment parameters can be configured with no need to change cables, switch out connectors or pull new wiring. Most importantly, this control capability can be implemented from a single location!

4 Bundle numbers range from 1 through 65535. A value of 0 represents an inactive bundle. Numbers 1 -255 are also reserved for multicast mode transmissions.

© Attero Tech LLC 2008 B-2 620-00001-01

CDK-8

Design Guide

APPENDIX C - Reference Documents

The following table lists the relevant reference documents.

Document Title CobraNet Programmer’s Reference (Cirrus Logic)

© Attero Tech LLC 2008 iii 620-00001-01