-
Notifications
You must be signed in to change notification settings - Fork 15
Auto CMD23 feature
###Description
Auto CMD23 is a feature that automatically issues a CMD23 before a CMD18 or CMD25 is sent. Objective of this function is to avoid performance deterioration during memory access by removing the interrupt service of CMD23. Argument1 register is used for CMD18 or CMD25. Then Argument2 register for CMD23. The Host Controller does not use Argument2 register for counting data transfer length. SDMA is not intended to use Auto CMD23. ADMA and Non-ADMA transfer can use Auto CMD23.
###The feature work principles
Figure1 and Figure2 illustrate the difference between feature and non-feature work flow. S_AXI_WDATA channel in the figures displays the overall issue commands. Definitely the box illustrated in this channel includes writing all related registers like Block Count, Block Size, Transfer Mode, Argument1, before issuing the command.
Figure1 shows non-feature work flow. Host driver sends CMD23 before multiple blocks data transaction (CMD18 or CMD25).
Figure2 shows feature work flow. Host driver sends only CMDxData, it can be CMD18 or CMD25. Host Controller sends CMD23 by itself and than after the response check passing, it sends initial CMDxData command. In that case the flow becomes less to one external interrupt and saves the time is taken to clear it.
CMD23
- SET_BLOCK_COUNT. Specify block count for CMD18 and CMD25.
CMD18
- READ_MULTIPLE_BLOCK. Continuously transfers data blocks from card to host until interrupted by a STOP_TRANSMISSION command.
CMD25
- WRITE_MULTIPLE_BLOCK. Continuously writes blocks of data until a STOP_TRANSMISSION follows.
CMDxData
- Commands with multiple block transfer. It can be either CMD18 or CMD25.
###Feature Implementation
The feature is implemented in S00_AXI module. It has a sate machine consists of three states as shown in figure3.
The controller recognises the feature usage from the Auto CMD Enable field in Transfer Mode register. So long as '10' value is not written to the that field the feature state machine stay on ACMDE state.
In ACMDC state controller sends CMDxData command and goes to ACMDS state if response for previous command is 0x0900. Otherwise it generates Auto CMD Error Interrupt in Normal Interrupt Status register and goes back to state ACMDE.
ACMDS state waits CMDxData command interrupt clearing and changes state to ACMDE.
ACMDE
- AutoCMD23 Enable wait state;
ACMDC
- AutoCMD23 Completion wait state;
ACMDS
- Associated CMDxData command Send state;
Feature switches command arguments, command index and interrupt outputting signals:
assign command_o = cmd_sel ? 14'h171a : slv_reg3 [29:16];
assign argument_o = arg_sel ? slv_reg0 : slv_reg2;
assign cmd_compl_int = cc_int_sel ? 1'b0 : cmd_int_st[`INT_CMD_CC];
eMMC Host Controller ver 3.0
- Pars board design
- Element layouts
-
AXI Host Controller for eMMC
* Control register map
- Summarise control register set
- Configuration register type
-
Detailed register description
- Argument2 reg
- Block Size reg
- Block Count reg
- Argument1 reg
- Transfer mode reg
- Command reg
- Response0 reg
- Response1 reg
- Response2 reg
- Response3 reg
- Present State reg
- Host control1 reg
- Clock control reg
- Timeout control reg
- Software reset reg
- Normal Interrupt status reg
- Error Interrupt status reg
- Normal Interrupt status enable reg
- Error Interrupt status enable reg
- Normal Interrupt signal enable reg
- Error Interrupt signal enable reg
- Auto CMD Error Status reg
- Capabilities reg
- ADMA System Address reg
- Host Control version reg * Advanced DMA
- Description
- ADMA work principles
- ADMA Implementation * AutoCMD23 feature
- Description
- The-feature-work-principles
- Feature implementation * Reference list * Performance tests