Wiki

This version (27 Jan 2020 15:13) was approved by Joshua Berlin.The Previously approved version (18 Apr 2017 08:57) is available.Diff

SPI Read (ADAU145X)

Click here to return to the Master Control Port section.

There are two different versions of the SPI Read module.

  1. SPI Periodic Read
  2. SPI Read with External Trigger

SPI Periodic Read

The 'SPI Periodic Read' block reads a particular sub address from any SPI slave periodically and sends the value read in the output pin.


Output Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: SPI Datadecimal - controlOutputs data read over SPI


Configuration

Click on to configure the parameters for SPI read.

To monitor multiple registers in the same slave, create multiple instances of the cell.

Support for Different Slave Select

If the device to be programmed is selected through MP0 (the /SS_M pin), no configuration is required in the register controls. Otherwise, the multipurpose pin must be configured to act as the slave select in the Register Window. (Hardware Configuration → ICx - ADAU145x Register Controls → MULTIPURPOSE/AUXADC)



  1. Slave Select Channel → 'Slave Select Channel x'
  2. MPx pin mode → 'Slave Select for Master SPI port'
  3. MPx pin function → 'Multipurpose function'



The following table shows the mapping between the module's parameter and the register control window. Please note that for some other blocks, there is an offset of 1 between the module parameter and the register control window.

'Slave Select' in Configuration Window 'Slave Select Channel' in the Register control
0 Slave Select Channel 0
1 Slave Select Channel 1
2 Slave Select Channel 2
3 Slave Select Channel 3
4 Slave Select Channel 4
5 Slave Select Channel 5



GUI Control

GUI Control NameDefault ValueRangeFunction Description
Bitrate100 kHz 100 kHZ - 100000 kHZSPI Speed
Slave Select00 – 6SPI Slave Select Channel
ModeMode 3 Mode 0/ Mode 3 SPI protocol mode
Data Length41-4 Length of the data to be read
Sub-Address Bytes21-4 Length of the sub address
Read Interval50 ms50 - 5000 msInterval between 2 consecutive SPI Read
Read Address00 to Pow(2, Address Length) - 1Address to be read from
Read Instruction10-255Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)
Command Length11-4 Length of the command sent in bytes
Initial Output Value0-2147483648 to 2147483647Value in the output pin till the first read is complete.


DSP Parameter Information

GUI Control NameCompiler NameFunction Description
BitrateSPIPriodicReadAlg1spiSpeedSPI Speed
ModeSPIPriodicReadAlg1spiModeSPI Protocol Mode
Slave SelectSPIPriodicReadAlg1slaveSelectSPI Slave Select Channel
Read AddressSPIPriodicReadAlg1readAddressAddress to be read from
Sub-Address BytesSPIPriodicReadAlg1addressLengthLength of the sub address
Data LengthSPIPriodicReadAlg1dataLengthLength of the data to be read
Read IntervalSPIPriodicReadAlg1readIntervalInterval between 2 consecutive SPI Read
Command LengthSPIPriodicReadAlg1commandLengthLength of the command sent in bytes
Read InstructionSPIPriodicReadAlg1readInstructionInstruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)

Supported ICs

  1. ADAU145x





SPI Read with external Trigger

The 'SPI Read with external Trigger' block reads a particular sub address from any I2C slave when a rising edge is detected in the input pin.


Input Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: Triggerdecimal - controlRising edge in this signal initiates read.


Output Pins

NameFormat [int/dec] - [control/audio]Function Description
Pin 0: SPI Datadecimal - controlOutputs data read over SPI


Configuration

Click on to configure the parameters for SPI read.

Create Multiple instances for monitoring multiple slaves/ multiple sub address from same slave.

Support for Different Slave Select

If the device to be programmed is selected through MP0 (the /SS_M pin), no configuration is required in the register controls. Otherwise, the multipurpose pin must be configured to act as the slave select in the Register Window. (Hardware Configuration → ICx - ADAU145x Register Controls → MULTIPURPOSE/AUXADC)



  1. Slave Select Channel → 'Slave Select Channel x'
  2. MPx pin mode → 'Slave Select for Master SPI port'
  3. MPx pin function → 'Multipurpose function'



The following table shows the mapping between module's parameter and the register control window.

'Slave Select' in Configuration Window 'Slave Select Channel' in the Register control
0 Slave Select Channel 0
1 Slave Select Channel 1
2 Slave Select Channel 2
3 Slave Select Channel 3
4 Slave Select Channel 4
5 Slave Select Channel 5



GUI Control

GUI Control NameDefault ValueRangeFunction Description
Bitrate100 kHz 100 kHZ - 100000 kHZSPI Speed
Slave Select00 – 6SPI Slave Select Channel
ModeMode 3 Mode 0/ Mode 3 SPI protocol mode
Data Length41-4 Length of the data to be read
Sub-Address Bytes21-4 Length of the sub address
Read Address00 to Pow(2, Address Length) - 1Address to be read from
Read Instruction10-255Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)
Command Length11-4 Length of the command sent in bytes
Initial Output Value0-2147483648 to 2147483647Value in the output pin till the first read is complete.


DSP Parameter Information

GUI Control NameCompiler NameFunction Description
BitrateSPIReadExtTriggerAlg1spiSpeedSPI Speed
ModeSPIReadExtTriggerAlg1spiModeSPI Protocol Mode
Slave SelectSPIReadExtTriggerAlg1slaveSelectSPI Slave Select Channel
Read AddressSPIReadExtTriggerAlg1readAddressAddress to be read from
Sub-Address BytesSPIReadExtTriggerAlg1addressLengthLength of the sub address
Data LengthSPIReadExtTriggerAlg1dataLengthLength of the data to be read
Command LengthSPIReadExtTriggerAlg1commandLengthLength of the command sent in bytes
Read InstructionSPIReadExtTriggerAlg1readInstructionInstruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)

Supported ICs

  1. ADAU145x
resources/tools-software/sigmastudio/toolbox/mastercontrolport/spiread.txt · Last modified: 27 Jan 2020 15:13 by Joshua Berlin