AN298 provides a description of the operation of firmware
for the CS485xx family of DSPs. This document gives a
general overview to the family of CS485xx Firmware
User’s Manuals designated by the general name
AN298[X][Y]; where [X] = MPM (Matrix Processing
Module), VPM (Virtual Processing Module), PPM (Post
Processing Module), and [Y] = A,B,C, etc. Note that the
CS485xx family of DSPs does not contain a compressed
data decoder.
More specifically, the purpose of this document is to serve
as an introduction to the various DSP Firmware designed
specifically to run on the CS485xx DSP. This document will
attempt to explain frequently used term in olog y and, at the
same time, systematically explain the OS operation and
communication for the CS485xx.
http://www.cirrus.com
CS485xx Block Diagram
Copyright Cirrus Logic, Inc. 2013
(All Rights Reserved)
AN298RC14
MAR '13
1 Document Strategy
1Document Strategy
The CS485xx has been designed with an inherent flexibility in terms of firmware usage. Each instance of operation of the
CS485xx can potentially use a different mix of DSP firmware depending on the need of the end user. As such, the strategy
adopted to document the various DSP firmware is based on a single General Overview coupled with an individual
Firmware User’s Manual for each DSP firmware module offered by Cirrus Logic. AN298 is the General Overview to the
family of CS485xx Firmware User’s Manuals.
The individual Firmware User’s Manuals, mentioned in the abov e paragraph, each follow as an extension of AN298. These
manuals have been named in such a way so as to classify them into one of the following categories:
•Operating System and General Overview
•Matrix Processing Module (MPM)
•Virtual Processing Module (VPM)
•Post Processing Module (PPM)
Furthermore, since each classification (e.g., Post Processing Module) may contain several associated DSP firmware, an
incremental letter assignment (e.g., A, B, C etc.) was given to index each DSP firmware within a given category. As an
example, the table below outlines the general naming conventions for several firmware modules.
Table 1-1. Naming Conventions
DSP Firmware ModuleBase NameOverlay TypeIndexReference Number
For a further breakdown of the available CS485xx firmware modules and their respective Firmware User’s Guide
document number, see Section 2.4. For the latest code updates and availability, contact your local field applications
engineer (FAE).
2AN298RC14
Mid-Processor Overlay
PCM Output s
Post-Processor O ver l ay (wit h APP loaded)
ID =0x83
ID =0xD9
ID =0xD5ID =0xD4
Tone
Control
Module
Re-Eq
Module
Bass
Management
Module
Parametric
EQ
Module
Delay
Module
Audio Manager
Module
Includes:
Ga in (mas ter)
Mute (mas ter )
Channel Trim
Channel Remap
Up-sampler
Mid-Processor Module
e.g. P L II, PLIIx, N e o6, Cros s b a r,
Viva+, COMS2, Neur al Sur r ound,
Circl e Surr ound 2
Virtualizer-Processor
Module
e.g. DVS2, DH2, SRS TSXT,
Audistry
Virtual izer-Processor Overlay
Mid-Processor O ve rlay
PCM input s
Down-
sampler
2 Overview
2Overview
The firmware that runs on this device expects a stereo or multi-channel PCM input source. This section describes the
different overlays as well as the functionality of the various processor module overlays.
Figure 2-1. CS485xx Firmware Block Diagram
2.1 Firmware Overlays
The data flows through a series of four firmware overlays that contain one or more firmware modules. A firmware module
provides the specific application affectionately and is controlled by the host via a Firmware Mana ger that defines the
control interface. The overlays segment the firmware module functionality into four independent groups depending on
function:
OS Overlay
•Manages the overall operation of the DSP. Also handles host communication, data inputs and outputs and various
other critical internal tasks.
Matrix Processing Module Overlay
•Performs additional channel generation, upmixing, downmixing. This segment is where algorithms such as Pro
®
Logic
Virtual Processing Module Overlay
•Performs stereo virtualizing to simulate multi-channel systems, such as Dolby
Dolby Virtual Surround
Post Processing Module Overlay
•This segment specifically caters to firmware that performs post-processing tasks. It allows the system designer
flexibility in “tweaking” the system for optimal audio performance and effects. This is also the segment in which
firmware modules such as the Audio Manager, Bass Manager, Tone Control, Delay, THX
Module will reside.
AN298RC143
IIx, Neo6™, and COMS2 reside.
®
.
®
Audistry®, Dolby Headphone®, and
®
, and Parametric-EQ
2.2 Code Image (.uld) Files
2.2 Code Image (.uld) Files
Each overlay is a separate code image file (.uld) that is loaded individually into the DSP. To ch ange the functionality of the
application, only the overlay of interest needs to be loaded. For example the Post Pro cessin g overlay can be exch anged
from SPP to APP by reloading only the Post Processing overlay. This reduces the system response time to user changes
as well as the code image storage requirements.
Note:There are 4 different memory configurations pertaining to the program RAM size (most code is in ROM). The
different memory configurations are denoted by p2, p4, p6, a nd p8 (p for prog ram memory, 2, 4, 6, a nd 8 are the
number of kilo-words, 1 word = 32 bits). Increasing P RAM decreases Y RAM. Each overlay is denoted with the
p2, p4, p6, or p8 in the .uld file name to indicate which memory configuration is used.
WARNING: Memory configuration must be consistent across all overlays (OS, MPM, VPM, and PPM).
2.2.1.uld File Naming Conventions
A generic template for representing .uld file can be represented by the following file name:
AA_48BBB_pC_DD_EE_rcFF.uld
2.2.1.1.uld File Name Variables
•
AA = Technology name (os, mb, app, spp, …)
•BBB = minimum chip required to run the firmware loaded by the .uld file (520, 560, dv2, au2)
•520 means this will run on a 520, 540, & 560
•540 means this will run on a 540 & 560 (Not on a 520)
•560 means this will run on a 560 (Not on a 520 or 540)
•dv2 means this will run on a CS48DV2x DSP only
•au2 mean this will run on a CS48AU2B only
•C = memory configuration (2, 4, 6, or 8)
This is the amount of PRAM in Kilowords (1 word = 32-bits). More PRAM means less YRAM.
The memory configurations can be broken down into the following categories:
•P2
•X Memory - 8kx32 SRAM, 8kx32 DROM
•Y Memory - 14kx32 SRAM, 8kx32 DROM
• P Memory - 2kx32 SRAM, 32kx32 DROM
•P4
•X Memory - 8kx32 SRAM, 8kx32 DROM
•Y Memory - 12kx32 SRAM, 8kx32 DROM
•P Memory - 4kx32 SRAM, 32kx32 DROM
•P6
•X Memory - 8kx32 SRAM, 8kx32 DROM
•Y Memory - 10kx32 SRAM, 8kx32 DROM
•P Memory - 6kx32 SRAM, 32kx32 DROM
•P8
•X Memory - 8kx32 SRAM, 8kx32 DROM
•Y Memory - 8kx32 SRAM, 8kx32 DROM
•P Memory - 8kx32 SRAM, 32kx32 DROM
•DD = Firmware version
4AN298RC14
2.3 Download Sequence
This variable is the specific memory map for the various overlays and can be specific to a particular version of ROM
Current Firmware versions are:
•01 = CS485xx
•02 =CS48DV2A
•03 = CS48DV2B
•04 = CS485xx
•05 = CS485xx
•06 = CS48AU2B
•09 = CS485xx
•EE = This variable indicates a major revision, increments when rc99 -> rc1
•FF = This Variable indicates a minor revision, increments by one for each new .uld build
2.2.1.2 Example of .uld file name
An example of a .uld file name:
os_48520_p2_48520_01_01_rc5.uld
•AA = os (DSPP operating system)
•BBB = CS48520 (this .uld will run on CS48520, CS48540, and CS48560)
•C = p2
•DD = 01 (all other overlays that are loaded on the DSP must be 01 overlays)
•EE = 01 (have not made over 100 of these)
•FF = rc5
2.3 Download Sequence
A standard procedure to download firmware to the DSP follows the following structure at system power-up:
1.Dolby Headphone 2 and Dolby Virtual Speaker 2 are only available as Matrix Processing Modules on the CS48AU2A, CS48DV2B, and CS48DV2B DSPs. Dolby Headphone 2 and
Dolby Virtual Speaker 2 are usually implemented as Virtualizer Processing Modules. See Table 2-2 for description of supported firmware versions/memory maps.
2.“All” --These modules are implemented through the “Custom PPM” in DSP Composer that allows these modules to be inclu ded as an object (.o) file and compiled into an .uld file,
which is loaded onto the DSP.
9* = 2, 4, or 6 for the three different memory maps
** = revision number for code
2.4 Firmware Modules and Associated Application Notes
While using the CS485xx, it is necessary to communicate with the DSP in order to control or monitor the various
downloaded firmware modules. We refer to this process of communication firmware messaging. The purpose of this
section is to cover the types and formats of these fir mware messages. In gene ral, with firmware messagin g, the user can
control the firmware module running on the DSP and subsequently perform various tasks such as:
•Configure the module after firmware download (e.g. Kickstarting the DSP, etc.)
•Change runtime parameters (e.g. adjusting the Volume, switching Pro Logic II modes, etc.)
•Obtain information from the DSP (e.g. current state of the firmware registers, data stream information, etc.)
3.1 Communication Overview
From a “micro-programmer” point of view, the CS485xx firmware modu les can be th ought of as a blocks of se veral 32 -bit
registers (variables) that either control the behavior of the firmware or store information about the state of the firmware at
the time of operation. Each register has a unique index. Access to the register involves a combination of a specified opcode
for that firmware module together with the register index. For each firmware module, the followin g opcod es are ava ilable :
•Write Opcode - Issues a command to write to a specific module.
•Read Opcode - Issues a command to read from a specific module.
•Read Response Opcode - Indicates module and index that has been read.
These available opcodes permit the following types of communication with the CS485xx DSP:
•Writing to the DSP
•Solicited read from the DSP
•Unsolicited read from the DSP
The following sub-sections cover the communication types listed above.
3.1.1Writing to the DSP
A write session with the CS485xx consists of one 8-byte message from the host to the CS485xx. In essence, the write
message consists of a 32-bit command word followed by a 32-bit data word (that is, data to be written to the register). The
command word is formed by combining the write opcode for that module together with th e index of the register that needs
to be written. The 32-bit Data Word is the value of the data intended to fill that register.
The following diagram shows the format of a write message:
A solicited read can be thought of as a request to read the contents of a specific register. This is comprised of a 32-bit
solicited read command word which is a request to read a specific index (register) in a given module. The DSP, upon
receiving this message, responds by sending back a 32-bit Read Response opcode and the requested 32-bit data word
contained in the register.
12AN298RC14
3.1 Communication Overview
The following diagram provides shows the format of a solicited read message:
The DSP needs to inform the host when the PLL is out of lock or th ere is a runtime memory allocation error (Malloc Failure).
Note that this type of message is an unsolicited message because it was initiated by the CS485xx rather than the host.
The PLL out of lock message is sent out on a best-efforts basis.
This message will come from the CS485xx to indicate a change in the system that must be addressed. The 8-byte
unsolicited read messages from the CS485xx consist of a 4-byte read command word which defines the type of unsolicited
message and an associated 4-byte data word that contains more information describing a system condition. The host
senses that an unsolicited message is ready to be read because the IRQ pin for the port being used goes low (SCP1_IRQ
or PCP_IRQ
). Every time the existence of a message is detected, the host should read out the 8-byte unsolicited read
Indices of the Firmware Module can differ in properties that are important to the system firmware programmer.
Indices marked by a ‘†’ can be modified after ki ck-star ting the application. However, indices not marked by a ‘†’ must be
configured by the system host controller before the kick-start message is sent to begin decoding. For these indices,
changes after kick-starting the application will not have the desired effect and can potentially cause the application to
become unstable.
All indices are reinitialized to the default values after downloading the overlay and soft-resetting the overlay.
4.1 Overview
Table 4-1 contains the API used to control the OS firmware module.
4.2 OS Manager
Index = 0xHHHH, data value = 0xhhhhhhhh
Write = 0x8100HHHH 0xhhhhhhhh
Read Request = 0x81C0HHHH
Read Response = 0x01C0HHHH 0xhhhhhhhh
14AN298RC14
4.2 OS Manager
T able 4-1. OS Module API
IndexVariableDescription
0x0000KICKSTARTBit 22: 0/1 Disable/Enable unsolicited message on sampling frequency change
0x0001IO_CONFIGSelect Input and Output Ports
0x0002OUTPUT_MODE_CONTROL
detection. It is strongly recommended that both Bit 21 and Bit 22 be enabled or
both be cleared/disabled. Bit 22 is only available on CS48AU2B, CS48DV2B,
and CS48DV6B DSPs.
Bit 21: 0/1 Disable/Enable continual check and re-evaluation of sampling
frequency. If the sampling frequency does change, a process similar to what
happens after a malloc failure event occurs. De pending on the Bit 22 setti ng, an
unsolicited message, 0x81000003FF00000s, is issued to the microcontroller
where “s” is the new sampling frequency. The OS then waits for this unsolicited
message to be picked up before waiting for a fresh kick-start to commence audi o
playback. It is strongly recommended that both Bit 21 and Bit 22 be enabled or
both be cleared/disabled.
Note: See OS MCV Index 0x0003 for all possible sampling frequency values.
For example, 48KHz = 0; 44.1KHz = 1 and 32KHz = 2.
Bit 21 is only available on CS48AU2B, CS48DV2B, and CS48DV6B DSPs.
Bit 20: 0/1 Disable/Enable one-shot sampling frequency detection and auto
update of OS MCV Index 0x0003 (HOST_SAMPLING_FREQUENCY). This
occurs immediately after kick-start is received. Bit 20 is only available on
CS48AU2B, CS48DV2B, and CS48DV6B DSPs.
Bit 16: 0/1 Disable/Enable Malloc Failure Reporting.
Bit 13: 0/1 Disable/Enable Continual GPIO updating.
Note: Only applicable is Bit 12 is set.
Bit 12: 0/1 Disable/Enable GPIO updates.
Bit 9: 0/1 Disable/Enable No Hardware Watchdog re-kick.
Bit 8: 0/1 Disable/Enable Hardware Watchdog.
Bit 4: 0/1 Disable/Enable Upsampling: back-end up sampling by 2 x (max 96kHz).
Bit 0: Kick-start: Set to 1 to trigger Kick-start
Default = 0x00000000
Bit 2: 0/1 Disable/Enable PCM 8-channel input Mode (Valid only on the
CS48560)
Bit 1: 0/1 Disable/Enable PCM: 2 Channel Input Mode
Bit 0: 0/1 Disable/Enable PCM: 4/8/12-channel Input Mode where the number of
channels is determined by the DSP product number as follows:
• 4 channels for CS48520
• 8 channels for CS48540
• 12 channels for CS48560
Note: 2 Channel Input Mode must be disabled when using Multi-Channel Input
Mode. Valid settings are either 0x00000001, 0x00000002, or 0x0000000 4.
Default = 0x00000002 (2 Channel Input)
†Bits 3:0 Output Mode (number of speakers present in the system)
Bit 0: 0/1 disable/initiate soft boot sequence.
Once a soft boot is initiated, the OS will send a 0x00000005 (SOFT_BOOT_ACK)
to the host. The host can then use the standard boo t protocol to download one or
more overlays. After a soft boot is initiated, the OS will respond to boot protocol
messages only.
The bit is reset to 0 after the soft boot is complete.
Default = 0x00000000
Bits 31:0
Bit[i] corresponds to pin GPIO[i] (i = 0,...,31).
Note: Both the GPIO_OE and GPIO_MUX must be set to 1 for a particular bit
before that bit can be written. Bit 13
to 1 (enabled).
Bits 31:0
When Bit[i] is 1, pin GPIO[i] is configured as an output. Wh en Bit[i] is 0, pin
GPIO[i] is configured as an input. (i = 0,...,31).
Bits 31:0
When Bit[i] is 1, pin GPIO[i] is a GPIO function. When Bit[i] is 0, pin GPIO[i] is
overwritten by the other function on that pin. Also, when Bit[i] is 0, Bit[i] of the
GPIO_D register is not writable
4.2 OS Manager
and 12 of KICKSTART variable must be set
16AN298RC14
4.3 OS Manager in DSP Composer
Table 4-1. OS Module API (Cont.)
IndexVariableDescription
0x0044PLL_STANDARD_CONFIGBits 11:4 Reference Clock Frequency - Frequency of clock attached to XTI pin,
Word is 1.
For example, to restrict DAO to 24bit output, ZERO_LSB_MASK=0xFFFFFF00.
Bits 31:16 Number of successful mallocations
Bits 15:0 Number of mallocations attempt s
4.3 OS Manager in DSP Composer
Most configuration information described in Section 4.2 can be controlled in DSP Composer. The OS Manager indices are
available in the Audio In, Audio Out, and System blocks. To insert these, simply drag the Audio In, Audio Out, and System
blocks to the workspace. Once Audio In, Audio Out, and System blocks are on the workspace the pre-kick and runtime
controls are accessible by double-clicking in there corresponding blocks. The controls are adjustable during runtime to
interact with the DSP in a similar way as would a host-microcontroller in an actual system. Fig. 5-4 shows when you initially
drag the Audio In block onto the workspace, the Audio In Device Properties automatically pops up, prompting to the user
to select the input source and data format. This is also accessible by right-clicking the Audio In block.
4.4 Unsolicited Messages
Index = 0xHHHH, data value = 0xhhhhhhhh
No Write Message. No Read Request.
Unsolicited Read Response = 0x8100HHHH 0xhhhhhhhh
AN298RC1417
Table 4-2. Unsolicited Messages
IndexMessageDescription
0x0000MALLOC_FAILUREBits 19:16
1 = MALLOC_ERROR_REQ_LIST_OVERFLOW—too many requests.
2 = MALLOC_ERROR_NO_FREE_BLOCK— no non-modulo free block was available to service
next request)
3 = MALLOC_ERROR_NO_MOD_FREE_BLOCK—no modulo free block was available to service
next request)
0x0002PLL_OUT_OF_LOCKBit 23 = 1.
Bits 22:0 = Reserved.
4.4 Unsolicited Messages
18AN298RC14
5 Audio Manager Firmware Module
5Audio Manager Firmware Module
5.1 Overview
The Audio Manager Firmware module provides the ability for the microcontroller to easily manage general audio controls
such as gain, mute, trim and channel remap.
5.2 Audio Manager
Index = 0xHHHH, data value = 0xhhhhhhhh
Write = 0x8300HHHH 0xhhhhhhhh
Read Request = 0x83c0HHHH
Read Response = 0x03c0HHHH 0xhhhhhhhh
Table 5-1. Audio Manager
IndexVariableDescription
0x0000GAIN
0x0001MUTE
0x0002CHAN_0_TRIM†0x00000000–0x80000000 (0.0 to 1.0)
0x0003CHAN_1_TRIM
0x0004CHAN_2_TRIM
0x0005CHAN_3_TRIM
0x0006CHAN_4_TRIM
0x0007CHAN_5_TRIM
†0x00000000–0x7FFFFFFF (-inf. to +24 dB). Overall System Gain. Signed value wit h decimal
point to the right of bit 27. Range is zero to (16-2
phase of all the outputs.
Default = 0x08000000 (+0 dB)
†0/1 = Unmute/Mute Audio
Default = 0x00000000 (unmuted)
Volume trim for channel 0 (Left Channel)
Default = 0x80000000
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 1 (Center Channel)
Default = 0x80000000
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 2 (Right Channel)
Default = 0x80000000
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for chann el 3 (Left Surround Channel)
Default = 0x80000000
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 4 (Right Surround Channel)
Default = 0x80000000
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 5 (Left Surround Back Channel)
Default = 0x80000000
-27
). Negative values can be used to invert the
0x0008CHAN_6_TRIM
0x0009CHAN_7_TRIM
0x000AReservedReserved
0x000BReservedReserved
0x000CReservedReserved
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for chann el 6 (Right Surround Back Channel)
Default = 0x80000000
†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for chann el 7 (LFE0 Channel)
Default = 0x80000000
AN298RC1419
Table 5-1. Audio Manager (Cont.)
IndexVariableDescription
0x000DReservedReserved
0x000ECHAN_8_TRIM†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 8 (Left Downmix Channel)
Default = 0x80000000
0x000FCHAN_9_TRIM†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 9 (Right Downmix Channel)
Default = 0x80000000
0x0010CHAN_10_TRIM†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for chann el 10 (Left Auxiliary Channel)
Default = 0x80000000
0x0011CHAN_11_TRIM†0x00000000–0x80000000 (0.0 to 1.0)
Volume trim for channel 11 (Right Auxiliary Channel)
Default = 0x80000000
5.2 Audio Manager
0x0012DAO1_DATA0_L_REMAP
0x0013DAO1_DATA0_R_REMAP
0x0014DAO2_DATA0_L_REMAP
DAO1_DATA1_L_
REMAP
0x0015DAO2_DATA0_R_REMAP
DAO1_DATA1_R_
REMAP
0x0016DAO1_DATA2_L_
REMAP
0x0017DAO1_DATA2_R_
REMAP
0x0018DAO1_DATA3_L_REMAP
XMT_LEFT_REMAP
0x0019DAO1_DATA3_R_REMAP
XMT_RIGHT_REMAP
†**
†**
†**
†**
†Selects which internal channel (0-11) is routed to DAO1 channel 0. A single internal channel
may be mapped to multiple outputs.
Default = 0x00000000 (Left Channel Audio Data)
†Selects which internal channel (0-11) is routed to DAO1 channel 1. A single internal channel
may be mapped to multiple outputs.
Default = 0x00000002 (Right Channel Audio Data)
Selects which internal channel (0-11) is routed to DAO1 channel 2. A single internal channel
†*
may be mapped to multiple outputs.
Default = 0x00000003 (Left Surround Channel Audio Data)
Selects which internal channel (0-11) is routed to DAO1 channel 3. A single internal channel
†*
may be mapped to multiple outputs.
Default = 0x00000004 (Right Surround Channel Audio Data)
Selects which internal channel (0-11) is routed to DAO1 channel 4. A single internal channel
may be mapped to multiple outputs.
Default = 0x00000001 (Center Channel Audio Data)
Selects which internal channel (0-11) is routed to DAO1 channel 5. A single internal channel
may be mapped to multiple outputs.
Default = 0x00000007 (LFE Channel Audio Data)
Selects which internal channel (0-11) is routed to DAO1 channel 6. A single internal channel
may be mapped to multiple outputs.
Default = 0x00000005 (Left Surround Back Channel Audio Data)
Selects which internal channel (0-11) is routed to DAO1 channel 7. A single internal channel
may be mapped to multiple outputs.
Default = 0x00000006 (Right Surround Back Channel Audio Data)
0x001ADAO2_DATA0_L_REMAPSelects which internal channel (0-11) is routed to DAO2 channel 0. A single internal channel
0x001BDAO2_DATA0_R_REMAPSelects which internal channel (0-11) is routed to DAO2 channel 1. A single internal channel
may be mapped to multiple outputs.
Default = 0x0000000c (Left DualZone Channel Audio Data)
may be mapped to multiple outputs.
Default = 0x0000000d (Right DualZone Channel Audio Data)
20AN298RC14
5.3 Audio Manager in DSP Composer Environment
Table 5-1. Audio Manager (Cont.)
IndexVariableDescription
0x001FReservedReserved
0x0020DAO2_DATA1_L_REMAP***Selects which internal channel (0-11) is routed to DAO2 channel 2. A si ngle internal channel
0x0021DAO2_DATA1_R_REMAP***Selects which internal channel (0-11) is routed to DAO2 channel 3. A single internal channel
* This is only available on the CS48520.
** This is only available on the CS48540 and CS48560.
*** This is only available on the CS48560.
may be mapped to multiple outputs.
Default = 0x0000000e (Left Auxiliary Channel Audio Data)
may be mapped to multiple outputs.
Default = 0x0000000f (Right Auxiliary Channel Audio Dat a)
5.3 Audio Manager in DSP Composer Environment
All configuration information described in Section 5.2 can be controlled in DSP Composer. The Audio Manager is included
with the (SPP) Standard Post Processing Overlay as well as the (APP) Advanced Post Processing Overlay Post
Processing Modules. To insert the Audio Manager, drag the Post Processing Modules folde r to the workspace and select
either SPP or APP. Once the SPP or APP Module is on the workspace, the runtime controls for Audio Manager can be
accessed by double-clicking the SPP or APP Module. The runtime control for the Audio Manager Module is shown in
Fig. 5-1, for Remap for the cs48520 in Fig. 5-2, and Remap for the cs48540 in Fig. 5-3. Remap is part of Audio Manager,
but has been separated into the system block to centralize chann el mapping co ntrols. The con trols are a djustable d uring
runtime to interact with the DSP in a similar way as would a host-microcontroller in an actual system.
Figure 5-1. DSP Composer Audio Manager Runtime Control Panel
Figure 5-2. DSP Composer DAO Remap for CS48520
Figure 5-3. DSP Composer DAO Remap for CS48540
AN298RC1421
5.4 DSP Composer Sample Projects
5.4 DSP Composer Sample Projects
Sample projects for various firmware applications have been provided in DSP Composer. Go to File > Open and browse
to CirrusDSP\CS485xx\projects\. There are several sample projects that exercise other modules. Open ‘pcm_spp.cpa’.
This project is configured for PCM processing, as shown in Fig. 5-4.
The PCM firmware module provides routing and control functions for stereo and multi-channel PCM input. The PCM
firmware is co-resident with the OS module. There are two main modes of PCM operation, stereo and multi-channel.
6.2 PCM Manager
Index = 0xHHHH, data value = 0xhhhhhhhh
Write = 0x9B00HHHH 0xhhhhhhhh
Read Request = 0x9BC0HHHH
Read Response = 0x1BC0HHHH 0xhhhhhhhh
T a ble6-1. PCM Manager
IndexVariableDescription
0x0000PCM_ENABLEBit 16 = Disable/Enable decimation by 4 = 0/1
Bit 8 = Disable/Enable Decimation by 2 = 0/1
Note: This setting is valid for stereo and multi-channel PCM inputs. When decimator
(down sampler) is enabled, set SAMPLE_RATE (index 0x03) in OS Manager as follows:
0 = 96 kHz in 48 kHz out
1 = 88.2 kHz in 44.1 kHz out
2 = 64 kHz in 32 kHz out
Sample rate conversion is supported only for stereo and 8-channel inputs.
Bit 4 = Disable/Enable De-emphasis = 0/1
Bit 0 = Disable/Enable PCM Module = 0/1
Default = 0x00000001
0x0001IO_BUFF_CH0_SOURCEInput Source for Channel 0 IO Buffer (Left) (see Table 2-1)
Default = 0x00000000 (DAI0 Left)
0x0002IO_BUFF_CH1_SOURCEInput Source for Channel 1 IO Buffer (Center) (see Table 2-1)
Default = 0x00000004 DAI2 Left)
0x0003IO_BUFF_CH2_SOURCEInput Source for Channel 2 IO Buffer (Right) (see Table 2-1)
Default = 0x00000001 (DAI0 Right)
0x0004IO_BUFF_CH3_SOURCEInput Source for Channel 3 IO Buffer (Left Surround) (see Table 2-1)
Default = 0x00000002 (DAI1 Left)
0x0005IO_BUFF_CH4_SOURCE*Input Source for Channel 4 IO Buffer (Right Surround) (see Table 2-1)
Default = 0x00000003 (DAI1 Right)
0x0006IO_BUFF_CH5_SOURCE*Input Source for Channel 5 Left IO Buffer (Surround Back) (see Table 2-1)
Default = 0x00000006 (DAI3 Left)
0x0007IO_BUFF_CH6_SOURCE*Input Source for Channel 6 IO Buffer (Surround Back Right) (see Table 2-1)
Default = 0x00000007 (DAI3 Right)
AN298RC1423
Table 6-1. PCM Manager (Cont.)
IndexVariableDescription
0x0008IO_BUFF_CH7_SOURCE*Input Source for Channel 7 IO Buffer (LFE0) (see table 2)
Default = 0x00000005 (DAI2 Right)
0x0009IO_BUFF_CH8_SOURCE**Input Source for Channel 8 IO Buffer (Left DualZone) (see table 2)
Default = 0x08000000 (no source)
0x000AIO_BUFF_CH9_SOURCE**Input Source for Channel 9 IO Buffer (Right DualZone) (see table 2)
Default = 0x08000000 (no source)
0x000BIO_BUFF_CH10_SOURCE**Input Source for Channel 10 IO Buffer (Left Auxiliary) (see table 2)
Default = 0x08000000 (no source)
0x000CIO_BUFF_CH11_SOURCE**Input Source for Channel 11 IO Buffer (Right Auxiliary) (see table 2)
* Not available on the CS48520.
** Not available on the CS48520 and CS48540.
6.2 PCM Manager
24AN298RC14
6.3 PCM Manager in DSP Composer
6.3 PCM Manager in DSP Composer
All configuration information described in Section 6.2 can be controlled in DSP Composer. Note that IO Buffer Channel
availability is device specific. The PCM Manager is part of the System block. To insert System block, drag in onto the
workspace. Once the System block is on the workspace the runtime and pre-kick controls for the PCM Manager can be
accessed by double-clicking the System block. When the System Block is first dragged onto the workspace the user is
prompted to select device and input mode as seen in Fig. 6-1. These settings can also be accessed by right-clicking the
System block and selecting Device Properties.
Figure 6-1. DSP Composer System Block Device Properties
The runtime controls are accessed by double-clicking the System Block as seen below in Fig. 6-2.
•Stereo Mode: Stereo PCM into DAI_D4. 2 Channel Mode set in IO_CONFIG in the OS Manager.
•Multi-channel Mode: PCM into DAI_D0 thru DAI_D3. Multi-Channel Mode set in IO_CONFIG in the OS Manager.
Stereo and Multi-channel input modes above are mutually exclusive and must be configured prior to runtime
(pre-kick-start). At runtime, switching between modes is not allowed.
26AN298RC14
7 Low Power Mode
7Low Power Mode
Note:The Low Power Mode section will be moving to the CS485xx Hardware User’s Manual in the next revision of that
manual.
The CS485xx has a low power mode to enable power savings when not in use. Low power mode is entered during the
softboot procedure.
7.1 Low Power Mode Messaging
One message is relevant to the low power mode p rocedure fo r the CS485xx. This message is SOFTBOOT_LP. The host
must read any ACK and prior messages before low power mode may commence.
MnemonicValue
SOFTBOOT_LP 0x81000009
0x00000011
7.2 Low Power Mode Steps
1. The system controller should send the SOFTBOOT_LP message (0x81000009 0x00000011).
2. The CS485xx is now in low power mode.
3. To test that the CS485xx is in low power mode, the host controller can send a message and verify that there is no
response. Additionally all the GPIO pins will be set to inputs in low power mode with weak pull-ups so their state
can be checked to verify low power mode is active.
7.3 Getting Out of Low Power Mode
1. Set DSP_RESET low.
2. Set DSP_RESET high.
3. Send the SLAVE_BOOT message (0x80000000).
4. Read the BOOT_START message (0x00000001).
5. Send the WAKEUP_*.ULD file.
Note:This is dependent on the current memory configuration. For example: if loading os_48520_p2_*.uld, then send
wakeup_p2.uld. If loading os_48520_p4_*.uld, then send wake up_p4.uld, and so forth. See Table 7-1.
6. Read the BOOT_SUCCESS message (0x00000002).
7. Send the SOFT_RESET message (0x40000000).
8. Read the APP_START message (0x00000004).
9. Send Hardware Configuration messages.
10.Send Software Configuration messages.
11.Send the KICKSTART messag e.
AN298RC1427
Table 7-1. wakeup_uld
.uld OptionsValues
WAKEUP_P2.ULD08004409
00000002
00000000
b485aa01
ffffffff
437a11f5
WAKEUP_P4.ULD08004409
00000002
00000001
b485aa01
ffffffff
437a11f4
WAKEUP_P6.ULD08004409
00000002
00000002
b485aa01
ffffffff
437a11f3
7.3 Getting Out of Low Power Mode
WAKEUP_P8.ULD08004409
00000002
00000003
b485aa01
ffffffff
437a11f2
28AN298RC14
8 Watchdog Timer
8Watchdog Timer
The CS485xx has an integrated hardware watchdog timer that ac ts as a “health” monitor for the DSP. The watchdog timer
must be reset by the DSP before the counter expires, or the entire chip is reset. This peripheral ensure s that the CS485xx
will reset itself in the event of a temporary system failure. In standalone mode (no host MCU), the DSP will reboot from
external FLASH. In slave mode (host MCU present), all GPIOs will be pulled high to signal the host that the watchdog has
expired and the DSP should be rebooted and reconfigured. The watchdog timer is disabled upon reset. There are thr ee
important registers that the host uses for config u rin g th e wat ch dog time r. Th e y are KICKST ART , WDG _R ELOAD, and
WDG_COUNT.
Note:The enabling of the watchdog timer happens post-kick-start.
8.1 Watchdog Timer Messaging
The KICKSTART message is shown below, to enable the watchdog set bit 8 (a = 1). To enable no watchdog re-kicking,
set bit 9 as well (a = 3). No watching re-kicking is only used as a test hook to verify that the reset occurs when the timer
expires.
MnemonicValue
KICKSTART 0x81000000
0x00000a00
The WDG_COUNT message is shown below and reflects the watchdog state at last timer ISR. The default is abcdefgh =
FFFFFFFF.
MnemonicValue
WDG_COUNT 0x81000018
0xabcdefgh
The WDG_RELOAD message is used to set the watchdog reload time and is shown in the table below. The default is
abcdefgh = 00BB800, which is a 1 second reload time at 12.288 MHz.
MnemonicValue
WDG_RELOAD 0x81000019
0xabcdefgh
The equation to calculate the watchdog reload time is shown below:
Watchdog reload time = MCLK / WDG_RELOAD
AN298RC1429
Contacting Cirrus Logic Support
For all product questions and inquiries, contact a Cirrus Logic Sales Representative.
To find the one nearest you, go to www.cirrus.com.
IMPORTANT NOTICE
Cirrus Logic, Inc. and its subsidiaries (“Cirrus”) believe that the information contained in this document is accurate and reliable. However, the information is subject to change
without notice and is pr ov i de d “A S I S” wi t hou t war r an ty of a ny k i nd ( ex p res s o r impl i ed ). Cus to mer s ar e adv ise d to obtain the l at est ver sion of relev ant inf or mati on to veri fy,
before placing orders, that information being relied on is current and compl ete. All products are sold subject to the terms and conditio ns of sal e suppl i ed at t he ti me of or de r
acknowledgment, including those pertaining to warranty, indemnification, and limitation of liability. No responsibility is assumed by Cirrus for the use of th is information,
including use of this information as the b asis fo r manufacture or sale of any items, or for infringement of patents or other rights of third parties. This document is the property
of Cirrus and by furnishi ng thi s i nformation, Cirrus gran ts no license, express or implied under any patents, mask work rights, copyrights, trademarks, tr a de se c re ts o r ot he r
intellectual proper ty rig hts. Cirr us owns t he co pyri ght s ass ociat ed with the i nf ormati on c onta ine d here in a nd giv es c onse nt f or copies to be made of the information only for
use within your organiz ation with respect to Cirrus integrat ed circuits or othe r products of Cirrus . This consent does not extend to other copying such as copying for general
distribution, advertising or promotional pu rp oses, or for creating any work for resale.
CERTAIN APPLICATIONS USING SEMICONDUCTOR PR ODUCTS MAY INVOLVE POTENTIAL RISKS OF DEATH, PERSONAL INJURY, OR SEVERE PROPERTY OR
ENVIRONMENTAL DAMAGE (“CRITICAL APPLICATI ONS”). CIRRUS PRODUCTS ARE NOT DESIGNED, AUTHORIZED OR WARRANTED FOR USE IN PRODUCTS
SURGICALLY IMPLANTED INTO THE BODY, AUTOMOTIVE SAFETY OR SECURITY DEVICES, LIFE SUPPORT PRODUCTS OR OTHER CRITICAL APPLICATIONS.
INCLUSION OF CIRRUS PRODUCTS IN SUCH APPLICATIONS IS UNDERSTOOD TO BE FULLY AT THE CUSTOMER’S RISK AND CIRRUS DISCLAIMS AND MAKES
NO WARRANTY, EXPRESS, STATUTORY OR IMPLIED, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR PARTICULAR
PURPOSE, WITH REGARD TO ANY CIRRUS PRODUCT THAT IS USED IN SUCH A MANNER. IF THE CUSTOMER OR CUSTOMER’S CUSTOMER USES OR PER MITS
THE USE OF CIRRUS PRODUCTS IN CRITICAL APPLICATION S, CUSTOMER AGRE ES, BY SUCH USE, TO FULLY INDEMNIFY CIRRUS, ITS OFFICERS, DIRECTORS,
EMPLOYEES, DISTRIBUTORS AND OTHER AGENTS FROM ANY AND ALL LIABILITY, INCLUDING ATTORNEYS’ FEES AND COSTS, THAT MAY RESULT FROM OR
ARISE IN CONNECTION WITH THESE USES.
Cirrus Logic, Cirrus, the Cirrus Logic logo designs, DSP Composer, and Intelligent Room Calibration are trademarks of Cirrus Logic, Inc. All other brand and product names
in this document may be trademarks or service marks of their respective owners.
Dolby, the “doubl e-D” logo, Dolby Digital, Audistry , Dolby Headphone, Dolby V irtual Surround, and Pro Logic are regis tered trademarks of Dolby Laboratories, Inc. AAC is a
trademark of Dolby Laboratories, Inc. Supply of an implementation of Dolby Technology does not convey a license nor imply a right under any patent, or any other industrial
or Intellectual Property Right of Dolby Laboratories, to use the Implementation in any finished end-user or ready-to-use final product. It is hereby notified that a license for
such use is required from Dolby Labo ra to ries.
DTS is a registered trademark of the Digital Theater Systems, Inc. DTS NEO:6 is a trademark of Digital Theater Systems, Inc. It is hereby notified that a third-party license
from DTS is necessary to distribute software of DTS in any finished end-user or ready-to-use final product.
THX® Technology by Lucasarts Entertainm en t Com p an y Corporation. THX is a registered trademark of Lucasa rts En terta inment Company Corporation.
SRS, Circle Surround, Trusurround, Trusurround XT, and TruBass are registered trademarks of SRS Labs, Inc. Circle Surround, Trusurround, Trusurround XT, and TruBass
technologies are incorporated under license from SRS Labs, Inc. The Circle Surround, Trusurround, Trusurround XT, and TruBass technology/solution rights incorporated in
the CS485xx are owned by SRS Labs, a U.S. Corporation and licensed to Cirrus Logic, Inc. Purchaser of CS485xx mu st sign a license for use of the chip and display of the
SRS Labs trademarks. Any pro ducts incorpor ating the CS485x x must be sent to SRS La bs for review. SRS Circle Surroun d, Trusurrou nd, Trusurround XT, and TruBass
technologies are protected under US and foreign patents issued and/or pending. Circle Surround, Trusurround, Trusurround XT, TruBass, SRS and (O) symbol are trademarks
of SRS Labs, Inc. in the United St ates and s elected foreig n countri es. Ne ither t he purch ase of the CS4 85xx, no r the cor respond ing sal e of audi o enhanc ement equip ment
conveys the right to sell commercialized recordings made with any SRS technology/solution. SRS Labs requires all set makers to comply with all rules and regulations as
outlined in the SRS Trademark Usage Manual.
RC3December, 2007Updated Legal Notice. Removed Softboot procedure that was duplicated in Chapter 2 of the
RC4July, 2008Updated Table 2-1 with read and write address information for firmware modules listed in that ta ble. Updated
RC5October, 2008Added Bits 20, 21, and 22 to the KICKSTART variable in Table 4-1. Changed product family number from
RC6October, 2008Added Section 2.2, which describes .uld files. Updated Table 2-1, adding Audyssey Dynamic Volume and
RC7December, 2008 Modified Section 7.
RC8August, 2009Updated Table 2-1. Added Table 2-2. Updated bit definitions for index 0x0001, IO_CONFIG. Updated bit
RC9September, 2009 Added Cirrus Bass Enhancer to Table 2-1.
RC10September, 2009 Added “†” symbol for indices 0x0012 to 0x001 9 in Table 5-1, indicating that the indices ca n be modif ied af ter
RC11December, 2010Added definition of Bit 8 to CONTROL_WORD variable in Table 5-1. Added index 0x0052 to Table 4-1.
RC12November, 2011Added information regarding PLL out of lock message to Section 3.1.3.
RC13November, 2012 Updated PCM Manager Controls screenshot in Fig. 6-2.
RC14March, 2013Updated Index 0x000a–0x0021 and removed 0x0022 in Table 5-1.
CONFIG1, and MALLOC_FAILURE.
CS485xxHardware User’s Manual.
implementation status and defini tions of GPIO_D, GPIO_OE, and GPI O_MUX variables in Table 4-1. Added
DAI_CLOCK_SOURCE variable in Table 4-1.
CS485xx to CS48xxxxx, which now covers the CS485xx, CS48AU2B, and CS48DV2B products.
Dynamic EQ, Audyssey EQ, and Audyssey EQ firmware modules to the table.
definitions for index 0x0000, PCM_ENABLE.
kick-start.
30AN298RC14
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.