...
Provide SPI configurations | This parameter allows the user to configure the block as a Master, Slave, or Master/Slave. When Configured as Master/Slave, an input port Mode is made available for the user to configure the Block dynamically. |
---|---|
Number of attached slave | This parameter is made available only when the Block is configured as Master or Master/Slave. It allows users to specify the number of slave devices attached to the master. |
Provide Baud Rate | This parameter allows the user to specify the frequency via a block parameter or via an input of the block. |
Baud Rate | This entry is made available if the "Provide Baud Rate" parameter is selected as "As Block Parameter". The user specifies the frequency by providing the System Clock divider value (e.g. System clock 100MHz, SCK 10MHz, Baud rate 100MHz/10MHz). |
Clock Phase (CPHA), TX Polarity (CPOL), RX Polarity | The clock phase and polarity can be modified for SPI data transfers. To remain flexible enough to work with many implementations of the I/O logic, the SPI Interface can toggle its serial clock phase and polarity.
The figure above shows the timing diagram for an SPI data transfer when the clock phase, CPHA, is set to "0". The waveform is shown for both positive and negative clock polarities of SCK. The SCK signal remains inactive for the first half of the first SCK cycle (SCK Cycle 1). In this transfer format, the falling edge of Slave Select indicates the beginning of a data transfer. Therefore, the Slave Select line must be negated and reasserted between each successive serial data transfer. The figure above shows the timing diagram for an SPI transfer when the clock phase, CPHA, is set to "1". The waveform is shown for both positive and negative clock polarities of SCK. The first SCK cycle begins with an edge on the SCK line from its inactive to its active level. The first edge of SCK indicates the start of the data transfer in this format. In accordance with these rules, the parameters TX and RX Polarity should be set according to this table to set the SPI block in the desired SPI mode: |
Note: Clock Phase (CPHA), TX Polarity (CPOL) and RX Polarity parameters can be set dynamically through the Block input port if the user selects the option "As an input port". | |
Slave Select Polarity | This parameter sets the polarity of the Slave Select signals. If the user selects the option "As an input port", the polarity can be dynamically through the Block input port. |
Data Width (1-128) | This parameter sets the width of the data. If the user selects the option "As an input port", the width can be dynamically through the Block input port. |
Provide Delay Compensation (CDC) | This parameter allows the user to specify the Delay Compensation Factor via a block parameter or via an input of the block. |
Delay Compensation (CDC) (0-63) | This entry is made available if the "Provide Delay Compensation" parameter is selected as "As Block Parameter". The user specifies the Delay value between 0 and 63. |
...