Skip to content

Commit c0ae0ab

Browse files
authored
[SDIO]: Updated the command response and interrupt sections in the SDIO documentation (#358)
* [SDIO]: a) Fixed typos b) Updated command response and interrupt section * [SDIO]: Fixed typo
1 parent aa1c8ad commit c0ae0ab

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

docs/doc-src/ip-blocks/udma_sdio.rst

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Features
3939
- Following events are supported:
4040

4141
- Error event.
42-
- End of transfer event.+
42+
- End of transfer event.
4343

4444
- Four error status for receive operation
4545

@@ -170,7 +170,9 @@ The command will be send in below sequence : -
170170

171171
CRC is calculated based on `x7+x3+1` polynomial function. CRC will calculated on Command opcode and argument field value.
172172

173-
The uDMA SDIO sends a stop command to communicate end of command transfer to the external device. Below is the format of end of command.
173+
The uDMA SDIO sends the stop command after sending all the data blocks for multi block transfer. The stop command has fixed command opcode value of 6 and command argument value of 0.
174+
Stop command packet is automatically created by SDIO and is transparent to users. The uDMA SDIO reads BLOCK_NUM bit DATA_SETUP CSR to determine the number of blocks to be transferred.
175+
In case of multi block transfer, BLOCK_NUM bit DATA_SETUP CSR must be non zero. The stop command will be sent in below sequence: -
174176

175177
+--------------+-----------+------------------+----------------+------------------+-------+---------+
176178
| Bit position | 47 | 46 | [45:40] | [39:8] | [7:1] | 0 |
@@ -278,11 +280,11 @@ a) When command response is needed
278280
b) When command response is not needed
279281
- RWN bit of DATA_SETUP CSR is 0 and EN bit of DATA_SETUP CSR is 1 and command is sent.
280282

281-
To initiate Tx operation, uDMA Core will drive 1 on `sddata_oen_o` line. Data will be transmitted over `sddata_o` data lines in below sequence: -
283+
To initiate Tx operation, uDMA sdio will drive 1 on `sddata_oen_o` line. Data will be transmitted over `sddata_o` data lines in below sequence: -
282284

283285
`Start bit -> Data -> CRC - > End`
284286

285-
To send start bit, the uDMA SDIO will drive the `sddata_o` will value 0. CRC for Tx operation is calculated based on `x16+x12+x5+1` polynomial function. CRC is calculated by the SDIO on the data received from the L2 memory.
287+
To send start bit, the uDMA SDIO will drive the `sddata_o` with value 0. CRC for Tx operation is calculated based on `x16+x12+x5+1` polynomial function. CRC is calculated by the SDIO on the data received from the L2 memory.
286288

287289
To get transmit data from L2 memory TX FIFO requests data from the uDMA core by asserting both the READY (space available) and REQ (request a new transaction) signals. The uDMA core arbitrates among multiple peripherals on receiving the REQ signal. When the SDIO TX channel is enabled and wins arbitration, the uDMA core issues a GNT (grant) signal and places the valid data read from L2 memory on the bus along with asserting VALID signal.
288290
Tx FIFO stores this received data and keeps the READY and REQ signals asserted as long as the aforementioned conditions remain valid. The uDMA core de-asserts the VALID signal in the following clock cycle and reasserts it only when new data is available for transmission. Initially, after reset or power-up, READY/REQ are asserted since the FIFO is empty.
@@ -314,12 +316,15 @@ The data is then written into L2 memory at the address specified by RX_SADDR, wi
314316

315317
CRC for both Rx and Tx operation is calculated based on `x16+x12+x5+1` polynomial function.
316318

319+
.. note:: The uDMA SDIO module does not support CRC error detection for externally received command responses or data.
320+
321+
317322
Interrupt
318323
~~~~~~~~~
319324

320325
uDMA SDIO generates the following interrupts:
321326

322-
- Error interrupt: Raised by uDMA SDIO when it encounter error while performing command-response reception or Rx/Tx operation.
327+
- Error interrupt: Raised by uDMA SDIO when it encounter timeout error while performing command-response reception or Rx operation.
323328
- End of transfer interrupt: Raised by uDMA SDIO after successfully completing Rx/Tx operation.
324329
- Rx channel interrupt: Raised by uDMA core's Rx channel after pushing the last byte of RX_SIZE bytes into core RX FIFO.
325330
- Tx channel interrupt: Raised by uDMA core's Tx channel after pushing the last byte of TX_SIZE bytes into core TX FIFO.
@@ -373,7 +378,8 @@ A CSR's volatility is indicated by its "type".
373378

374379
Details of CSR access type are explained `here <https://docs.openhwgroup.org/projects/core-v-mcu/doc-src/mmap.html#csr-access-types>`_.
375380

376-
The CSRs RX_SADDR and RX_SIZE specify the configuration for the transaction on the RX channel. The CSRs TX_SADDR and TX_SIZE specify the configuration for the transaction on the TX channel. The uDMA Core creates a local copy of this information at its end and uses it for current ongoing transactions.
381+
The CSRs RX_SADDR and RX_SIZE specify the configuration for the transaction on the RX channel. The CSRs TX_SADDR and TX_SIZE specify the configuration for the transaction on the TX channel.
382+
The uDMA Core creates a local copy of this information at its end and uses it for current ongoing transactions.
377383

378384
RX_SADDR
379385
~~~~~~~~
@@ -547,6 +553,9 @@ DATA_SETUP
547553
+-------------+--------+--------+------------+---------------------------------------------------------------------+
548554
| BLOCK_NUM | 15:8 | W | 0x00 | Number of blocks to be transferred. This value works together |
549555
| | | | | with `BLOCK_SIZE` to determine total transfer size. |
556+
| | | | | |
557+
| | | | | - 0 : Single block transfer |
558+
| | | | | - non zero : Multi block transfer |
550559
+-------------+--------+--------+------------+---------------------------------------------------------------------+
551560
| QUAD | 2:2 | W | 0x0 | Enables Quad SPI mode when set to `1`. In this mode, 4 data lines |
552561
| | | | | are used for faster data transfer. Set to `0` for standard mode. |
@@ -645,7 +654,7 @@ STATUS
645654
+---------+-------+--------+------------+-----------------------------------------------------------------------------+
646655
| Field | Bits | Access | Default | Description |
647656
+=========+=======+========+============+=============================================================================+
648-
| STATUS | 31:16 | RW | 0x0 | - Bits [21:16] represent the Command Status, a 6-bit field indicating |
657+
| STATUS | 31:16 | R | 0x0 | - Bits [21:16] represent the Command Status, a 6-bit field indicating |
649658
| | | | | the state or result of the most recent command execution. |
650659
| | | | | |
651660
| | | | | - 6'b000001: STATUS_RSP_TIMEOUT |
@@ -661,7 +670,8 @@ STATUS
661670
| | | | | They hold no functional meaning and may be read as zero or undefined. |
662671
+---------+-------+--------+------------+-----------------------------------------------------------------------------+
663672
| ERR | 1:1 | RWC | 0x0 | Writing any value clears the bit. Indicates error either |
664-
| | | | | during data or command-response reception. |
673+
| | | | | during data or command-response reception. Error type can be read from the |
674+
| | | | | status bit(31:16) |
665675
| | | | | |
666676
| | | | | - 0x0: No error |
667677
| | | | | - 0x1: Error |
@@ -711,6 +721,8 @@ a) When command response is needed
711721
b) When command response is not needed
712722
- RWN bit of DATA_SETUP CSR is 0 and EN bit of DATA_SETUP CSR is 1 and command already transferred.
713723

724+
Of course, the command should be transferred successfully for Tx operation to start.
725+
714726
Rx Operation
715727
~~~~~~~~~~~~
716728

@@ -725,6 +737,8 @@ The uDMA SDIO can be configured to perform Tx operation based on the below condi
725737

726738
- STATUS bit of the STATUS CSR reflects the status of Rx operation.
727739

740+
Of course, the command should be transferred successfully for Rx operation to start.
741+
728742
End of transfer Interrupt
729743
~~~~~~~~~~~~~~~~~~~~~~~~~
730744

0 commit comments

Comments
 (0)