NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

DA8xx Control Communication

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

This section talks about the points that need to be taken care by the uC while writing the code to communicate with DSP.

Alpha Command[edit]

  • It can control PA/F and Decoders, ASPs and Encoders on PA/F
  • Every command consists one or more 16bit units
  • Mostly commands are used to read/write registers of different modules.
  • Commands can read or write to 8/16/32bits registers.
  • Also there are commands that can read/write variable length arrays.
  • There 'execute' type of commands (e.g. Input/Output switching commands)which can invoke a set of commands, internally, once received by DSP.
  • Customers can make their own alpha commands for modules developed by them.

Example from ProLogicII[edit]

Pl2x command.PNG

  • Definition of alpha commands (example of PL2x)
 ...
//Mode Select for PL2x
#define  readPL2XOperationalMode             0xc200+STD_BETA_PL2x,0x0d00
#define writePL2XOperationalModeEmulation    0xca00+STD_BETA_PL2x,0x0d00   //PL1 emulation mode
#define writePL2XOperationalModeVirtual      0xca00+STD_BETA_PL2x,0x0d01   //Virtual compatible mode
#define writePL2XOperationalModeMusic        0xca00+STD_BETA_PL2x,0x0d02   //Music mode
#define writePL2XOperationalModeMovie        0xca00+STD_BETA_PL2x,0x0d03   //Movie mode(default)
#define writePL2XOperationalModeMatrix       0xca00+STD_BETA_PL2x,0x0d04   //Matrix mode
#define writePL2XOperationalModeCustom       0xca00+STD_BETA_PL2x,0x0d07   //Custom(Override mode)
#define writePL2XOperationalModeReserved1    0xca00+STD_BETA_PL2x,0x0d08
#define writePL2XOperationalModeReserved2    0xca00+STD_BETA_PL2x,0x0d09
#define writePL2XOperationalModeReserved3    0xca00+STD_BETA_PL2x,0x0d0a
#define writePL2XOperationalModeGame         0xca00+STD_BETA_PL2x,0x0d0e
...

Communication[edit]

Physical Protocol[edit]

  • Serial Protocol Binary 2 (SP-B2): I2C bus communication (8bit data)
  • Serial Protocol Binary 16 (SP-B16): SPI bus communication (16bit data)

SP-B2[edit]

  • A communication with CPM via I2C bus
  • Slave address is
I2C0 ->0x28(Default)
I2C1 ->0x29(Default)

SP-B2.PNG

SP-B16[edit]

  • A communication with CPM via SPI bus

SP-B16.PNG

SP-??[edit]

  • A communication with CPM via UART bus
    • TDB

Alpha Command communication via CPM (Count Packet Mode)[edit]

  • Packet communication
  • Send the number of data words (Count) before binary data(Alpha Command)
  • Little Endian
  • Binary data is sent after Count, both DSP to Host and Host to DSP
SP-B2
0x02-> Count
0xAB-> First element
0xCD-> Second element
SP-B16
0x0002-> Count
0xABCD-> First element
0xEFGH-> Second element
  • For SP-B2, the maximum number of elements per 1 packet is 254 elements
  • For SP-B16, the maximum number of elements per 1 packet is 240 elements

How to send the commands?[edit]

SP-B2[edit]

When the following alpha command is to be sent

#define  execPA17IInAnalog48 0xf123

uC should send as follows

uC sends: 0x03,0x00,0x23,0xf1 (or 0x02,0x23,0xf1)
DSP responds: 0x02,0x23,0xf1
  • Micro C must wait for a response from the DSP after sending the shortcut or read command.

SP-B16[edit]

When the following alpha command is sent

#define  readDECSourceProgram 0xc224,0x0a00

uC should send as follows

uC sends: 0x002,0xc224,0x0a00
DSP responds: 0x002,0xca24,0x0a??
      (?? Is depends on the current stream. This response is defined as wroteDECSourceProgramXXX)
  • Micro C must wait for a response from the DSP after sending the shortcut or read command. Keep sending 0 till the response will come

Detail Example of SPI Command Sending[edit]

Caution[edit]

  • Micro C need to check if ENA is asserted before sending every single word. This is flow control for DSP communication. You should check ENA after asserting CS or you cannot get ENA's correct status. This is not needed for boot sequence. Only alpha command communication needs it.
  • Before starting alpha command communication, you should send reset query to establish a link between uC and DSP. See H/W Bring-up for detail. Note that this is not needed SP-B2.
  • PORARITY=1, PHASE=0.

Read Example[edit]

In case of reading a data “0x22554411” via SPI

SIMO 0000000000000000 0000000000000000  
SOMI 0100010000010001 0010001001010101

Write Example[edit]

In case of writing a data “0x33665577” to DSP via SPI

SIMO 0101010101110111 0011001101100110  
SOMI 0000000000000000 0000000000000000

Example of sending Read Command via SPI[edit]

#define readVOLControlMaster 0xc300+STD_BETA_VOLUME,0x0010,NN

STD_BETA_VOLUME is 0x26. So, the command to send is 0xc326,0x0010

SIMO 0000000000000010 1100001100100110 0000000000010000  
SOMI 0000000000000000 0000000000000000 0000000000000000

Then receive the response

SIMO 0000000000000000 0000000000000000 0000000000000000 0000000000000000  
SOMI 0000000000000011 1100101100100110 0000000000010000 1111111111011000

Example of sending I/O shortcut via SPI[edit]

#define  execPA17IInAnalogStereo48 0xf123
Send command
SIMO 0000000000000001 1111000100100011   
SOMI 0000000000000000 0000000000000000

Then receive the response

SIMO 0000000000000000 0000000000000000   
SOMI 0000000000000001 1111000100100011

Example of sending write command (Set master volule to -20dB) via SPI[edit]

#define writeVOLControlMasterN(NN) 0xcb00+STD_BETA_VOLUME,0x0010,NN

writeVOLConstrolMasterN(-20*2) is the command to send. STD_BETA_VOLUME is 0x26. So, the command to send is

0xcb26,0x0010,0xFFD8

You should add count. So, result is

SIMO 0000000000000011 1100101100100110 0000000000010000 1111111111011000  
SOMI 0000000000000000 0000000000000000 0000000000000000 0000000000000000


Detail Example of I2C Command Sending[edit]

Caution[edit]

  • Micro C need to check if DSP holds CLK before START and sending every single byte. This is flow control for DSP communication.

Read Example[edit]

In case of reading a data “0x22554411” via I2C Assuming Slave Address is 0x28

START 0101000 R ACK 00010001 ACK STOP 
START 0101000 R ACK 01000100 ACK STOP 
START 0101000 R ACK 01010101 ACK STOP 
START 0101000 R ACK 00100010 ACK STOP 

Write Example[edit]

In case of writing a data “0x33665577” to DSP via I2C Assuming Slave Address is 0x28

START 0101000 W ACK 01110111 ACK STOP 
START 0101000 W ACK 01010101 ACK STOP 
START 0101000 W ACK 01100110 ACK STOP 
START 0101000 W ACK 00110011 ACK STOP 

Example of sending Read Command via I2C[edit]

#define readVOLControlMaster 0xc300+STD_BETA_VOLUME,0x0010,NN

STD_BETA_VOLUME is 0x26. So, the command to send is 0xc326,0x0010

Send command
START 0101000 W ACK 00000101 ACK 00000000 ACK STOP 
START 0101000 W ACK 00100110 ACK 11000011 ACK STOP 
START 0101000 W ACK 00010000 ACK 00000000 ACK STOP 

Then receive the response

START 0101000 R ACK 00000111 ACK 00000000 ACK STOP 
START 0101000 R ACK 00100110 ACK 11001011 ACK STOP 
START 0101000 R ACK 00010000 ACK 00000000 ACK STOP 
START 0101000 R ACK 11011000 ACK 11111111 ACK STOP

Example of sending I/O shortcut via I2C[edit]

#define  execPA17IInAnalogStereo48 0xf123
Send command
START 0101000 W ACK 00000011 ACK 00000000 ACK STOP 
START 0101000 W ACK 00100011 ACK 11110001 ACK STOP 

Then receive the response

START 0101000 R ACK 00000011 ACK 00000000 ACK STOP 
START 0101000 R ACK 00100011 ACK 11110001 ACK STOP 

Example of sending write command (Set master volule to -20dB) via I2C[edit]

#define writeVOLControlMasterN(NN) 0xcb00+STD_BETA_VOLUME,0x0010,NN

writeVOLConstrolMasterN(-20*2) is the command to send. STD_BETA_VOLUME is 0x26. So, the command to send is

0xcb26,0x0010,0xFFD8

You should add count. So, result is

START 0101000 W ACK 00000111 ACK 00000000 ACK STOP 
START 0101000 W ACK 00100110 ACK 11001011 ACK STOP 
START 0101000 W ACK 00010000 ACK 00000000 ACK STOP 
START 0101000 W ACK 11011000 ACK 11111111 ACK STOP
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DA8xx Control Communication here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article DA8xx Control Communication here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article DA8xx Control Communication here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article DA8xx Control Communication here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article DA8xx Control Communication here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DA8xx Control Communication here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article DA8xx Control Communication here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article DA8xx Control Communication here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article DA8xx Control Communication here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity