Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
resources:tools-software:sigmastudiov2:modules:mastercontrolport:spiread [19 Mar 2021 02:05]
John Joseph created
resources:tools-software:sigmastudiov2:modules:mastercontrolport:spiread [12 May 2021 12:15]
Prasad Kamath [DSP Parameter Computation]
Line 1: Line 1:
 [[resources/​tools-software/​sigmastudiov2/​modules/​mastercontrolport|Click here to return to the Master Control Port page]] [[resources/​tools-software/​sigmastudiov2/​modules/​mastercontrolport|Click here to return to the Master Control Port page]]
 ====== SPI Read ====== ====== SPI Read ======
 +\\
 +{{:​resources:​tools-software:​sigmastudiov2:​modules:​mastercontrolport:​spi_read_ssp.jpg?​nolink&​300|}}
 +\\
 +
 +===== Description =====
 +\\
 +There are two different versions of the SPI Read module.
 +
 +  - SPI Periodic Read
 +  - 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 {{:​resources:​tools-software:​sigmastudio:​toolbox:​mastercontrolport:​spi.png?​nolink|}} to configure the parameters for SPI read.
 +{{ :​resources:​tools-software:​sigmastudiov2:​modules:​mastercontrolport:​spi_read_wndw_ssp.jpg?​nolink&​400 |}} 
 +\\
 +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)
 +{{ :​resources:​tools-software:​sigmastudiov2:​modules:​mastercontrolport:​slave_selection_mpx_ssp.jpg?​nolink&​400 |}}
 +\\
 +\\
 +  - Slave Select Channel -> 'Slave Select Channel x'
 +  - MPx pin mode -> 'Slave Select for Master SPI port'
 +  - 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 =====
 +^Name^ADSP-214xx^ADSP-215xx/​ADSP-SC5xx^ADAU145x/​146x^
 +|----------------------------------------|------------------------------------------|--------------------------------------------------|-------------------------------------------|
 +|SPI Periodic Read| Not Supported | Not Supported| Sample|
 +\\
 +===== Pins =====
 +\\
 +====Output Pins====
 +^Name^Type^Description^
 +|---------------------------|-------------------------------|--------------------------------------|
 +|SPI Data|Control|Outputs data read over SPI|
 +\\
 +===== Configurable Parameters =====
 +
 +^GUI Control Name^Default Value^Range^Function Description^
 +| ---------------------------------------------------- | ---------------------- | ------------------------------------------ | ---------------------------------------------------------------------- |
 +|SPIBitrate|100 kHz| 100 kHZ - 100000 kHZ|SPI Speed|
 +|SPISlaveSelectChannel|0|0 – 6|SPI Slave Select Channel|
 +|SPIMode|SPI Mode 3| Mode 0/ Mode 3| SPI protocol mode|
 +|DataLength|4|1-4| Length of the data to be read|
 +|AddressLength|2|1-4| Length of the sub address|
 +|Read Interval|50 ms|50 - 5000 ms|Interval between 2 consecutive SPI Read|
 +|AddressToRead|0|0 to Pow(2, Address Length) - 1|Address to be read from|
 +|SPIReadInstruction|1|0-255|Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/​flash)|
 +|SPICommandLength|1|1-4| Length of the command sent in bytes|
 +|InitialOutputValue|0|-2147483648 to 2147483647|Value in the output pin till the first read is complete.|
 +\\
 +===== DSP Parameters===== ​
 +\\
 +^ Parameter Name       ^ Description^ ADAU145x/​146x ^
 +| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------|---------------------------- |
 +|spiSpeed|SPI Speed|Integer32|
 +|spiMode|SPI Protocol Mode|Integer32|
 +|slaveSelect|SPI Slave Select Channel|Integer32|
 +|readAddress|Address to be read from|Integer32|
 +|addressLength|Length of the sub address|Integer32|
 +|dataLength|Length of the data to be read|Integer32||
 +|commandLength|Length of the command sent in bytes|Integer32|
 +|readInstruction|Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/​flash)|Integer32|
 +\\
 +===== DSP Parameter Computation =====
 +\\
 +readAddress = AddressToRead < <(8* (4 - (AddressLength + SPICommandLength))
 +\\
 +readInstruction = SPIReadInstruction < < (8* AddressLength)+ ​ ((8* (4 - (AddressLength + SPICommandLength))
 +\\
 +
 +===== 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 {{:​resources:​tools-software:​sigmastudio:​toolbox:​mastercontrolport:​spi.png?​nolink|}} to configure the parameters for SPI read. 
 +\\
 +{{ :​resources:​tools-software:​sigmastudiov2:​modules:​mastercontrolport:​spi_read_wndw_ssp.jpg?​nolink&​400 |}}
 +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)
 +{{ :​resources:​tools-software:​sigmastudiov2:​modules:​mastercontrolport:​slave_selection_mpx_ssp.jpg?​nolink&​400 |}}
 +\\
 +\\
 +  - Slave Select Channel -> 'Slave Select Channel x'
 +  - MPx pin mode -> 'Slave Select for Master SPI port'
 +  - 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 =====
 +^Name^ADSP-214xx^ADSP-215xx/​ADSP-SC5xx^ADAU145x/​146x^
 +|----------------------------------------|------------------------------------------|--------------------------------------------------|-------------------------------------------|
 +|SPI Read with External Trigger| Not Supported | Not Supported| Sample|
 +\\
 +===== Pins =====
 +\\
 +====Input Pins====
 +\\
 +^Name^Type^Description^
 +|---------------------------|-------------------------------|--------------------------------------|
 +|Trigger|Control|Rising edge in this signal initiates read|
 +\\
 +====Output Pins====
 +\\
 +^Name^Type^Description^
 +|---------------------------|-------------------------------|--------------------------------------|
 +|SPI Data|Control|Outputs data read over SPI|
 +\\
 +===== Configurable Parameters =====
 +
 +===== Configurable Parameters =====
 +
 +^GUI Control Name^Default Value^Range^Function Description^
 +| ---------------------------------------------------- | ---------------------- | ------------------------------------------ | ---------------------------------------------------------------------- |
 +|SPIBitrate|100 kHz| 100 kHZ - 100000 kHZ|SPI Speed|
 +|SPISlaveSelectChannel|0|0 – 6|SPI Slave Select Channel|
 +|SPIMode|SPI Mode 3| Mode 0/ Mode 3| SPI protocol mode|
 +|DataLength|4|1-4| Length of the data to be read|
 +|AddressLength|2|1-4| Length of the sub address|
 +|AddressToRead|0|0 to Pow(2, Address Length) - 1|Address to be read from|
 +|SPIReadInstruction|1|0-255|Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/​flash)|
 +|SPICommandLength|1|1-4| Length of the command sent in bytes|
 +|InitialOutputValue|0|-2147483648 to 2147483647|Value in the output pin till the first read is complete.|
 +\\
 +===== DSP Parameters===== ​
 +\\
 +===== DSP Parameters===== ​
 +\\
 +^ Parameter Name       ^ Description^ ADAU145x/​146x ^
 +| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------|---------------------------- |
 +|spiSpeed|SPI Speed|Integer32|
 +|spiMode|SPI Protocol Mode|Integer32|
 +|slaveSelect|SPI Slave Select Channel|Integer32|
 +|readAddress|Address to be read from|Integer32|
 +|addressLength|Length of the sub address|Integer32|
 +|dataLength|Length of the data to be read|Integer32||
 +|commandLength|Length of the command sent in bytes|Integer32|
 +|readInstruction|Instruction value for a read operation (0x1 for ADI audio devices, typically 0x3 for eeprom/​flash)|Integer32|
 +\\
 +===== DSP Parameter Computation =====
 +\\
 +readAddress = AddressToRead < <(8* (4 - (AddressLength + SPICommandLength))
 +\\
 +readInstruction = SPIReadInstruction < < (8* AddressLength)+ ​ ((8* (4 - (AddressLength + SPICommandLength))
 +\\
 +
 +
resources/tools-software/sigmastudiov2/modules/mastercontrolport/spiread.txt · Last modified: 12 May 2021 12:15 by Prasad Kamath