Wiki

This version is outdated by a newer approved version.DiffThis version (12 May 2021 11:55) is a draft.
Approvals: 0/1
The Previously approved version (19 Mar 2021 02:05) is available.Diff

This is an old revision of the document!


Click here to return to the Master Control Port page

SPI Read



Description


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.

Usage


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



Targets Supported

NameADSP-214xxADSP-215xx/ADSP-SC5xxADAU145x/146x
—————————————-——————————————————————————————--——————————————-
SPI Periodic Read Not Supported Not Supported Sample


Pins


Output Pins

NameTypeDescription
———————————————————-————————————--
SPI DataControlOutputs data read over SPI


Configurable Parameters

GUI Control NameDefault ValueRangeFunction Description
—————————————————- ———————- —————————————— ———————————————————————-
SPIBitrate100 kHz 100 kHZ - 100000 kHZSPI Speed
SPISlaveSelectChannel00 – 6SPI Slave Select Channel
SPIModeSPI Mode 3 Mode 0/ Mode 3 SPI protocol mode
DataLength41-4 Length of the data to be read
AddressLength21-4 Length of the sub address
Read Interval50 ms50 - 5000 msInterval between 2 consecutive SPI Read
AddressToRead00 to Pow(2, Address Length) - 1Address to be read from
SPIReadInstruction10-255Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)
SPICommandLength11-4 Length of the command sent in bytes
InitialOutputValue0-2147483648 to 2147483647Value in the output pin till the first read is complete.


DSP Parameters


Parameter Name Description ADAU145x/146x
—————————————- ———————————————————————————————————————————————————-
spiSpeedSPI SpeedInteger32
spiModeSPI Protocol ModeInteger32
slaveSelectSPI Slave Select ChannelInteger32
readAddressAddress to be read fromInteger32
addressLengthLength of the sub addressInteger32
dataLengthLength of the data to be readInteger32
commandLengthLength of the command sent in bytesInteger32
readInstructionInstruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)Integer32


DSP Parameter Computation


Not applicable

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.

Usage


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



Targets Supported

NameADSP-214xxADSP-215xx/ADSP-SC5xxADAU145x/146x
—————————————-——————————————————————————————--——————————————-
SPI Read with External Trigger Not Supported Not Supported Sample


Pins


Input Pins


NameTypeDescription
———————————————————-————————————--
TriggerControlRising edge in this signal initiates read


Output Pins


NameTypeDescription
———————————————————-————————————--
SPI DataControlOutputs data read over SPI


Configurable Parameters

Configurable Parameters

GUI Control NameDefault ValueRangeFunction Description
—————————————————- ———————- —————————————— ———————————————————————-
SPIBitrate100 kHz 100 kHZ - 100000 kHZSPI Speed
SPISlaveSelectChannel00 – 6SPI Slave Select Channel
SPIModeSPI Mode 3 Mode 0/ Mode 3 SPI protocol mode
DataLength41-4 Length of the data to be read
AddressLength21-4 Length of the sub address
AddressToRead00 to Pow(2, Address Length) - 1Address to be read from
SPIReadInstruction10-255Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)
SPICommandLength11-4 Length of the command sent in bytes
InitialOutputValue0-2147483648 to 2147483647Value in the output pin till the first read is complete.


DSP Parameters


Parameter Name Description ADAU145x/146x
—————————————- ——————————————————————————--—————————-
spiSpeedSPI SpeedInteger32
spiModeSPI Protocol ModeInteger32
slaveSelectSPI Slave Select ChannelInteger32
readAddressAddress to be read fromInteger32
addressLengthLength of the sub addressInteger32
dataLengthLength of the data to be readInteger32
commandLengthLength of the command sent in bytesInteger32
readInstructionInstruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/flash)Integer32


DSP Parameter Computation


Not applicable

resources/tools-software/sigmastudiov2/modules/mastercontrolport/spiread.1620813326.txt.gz · Last modified: 12 May 2021 11:55 by Prasad Kamath