Download presentation
Presentation is loading. Please wait.
Published byAndrew Faulkner Modified over 4 years ago
1
SD IO Interface World Real Time Clock / Alarm with C-LCM
2
SD / SDIO Card
3
SD Card Introduction SD Card,全名Security Digital Card,是小型記憶卡的一種,它被廣泛地於攜帶型裝置上使用,是由日本松下(Panasonic)公司、東芝(TOSHIBA)公司與美國San Disk公司共同開發研製的。 SD卡可以看作是由MMC卡衍生出來的。SD卡投影面積與MMC卡相同,只是略微厚一點,但是SD卡的容量大得多,且讀寫速度也比MMC卡快 4倍。同時,SD卡的介面與MMC卡是相容的,支援SD卡的介面大多支援MMC卡。在2006年,SD卡容量有 8、16、32、64、128、256、512 MB,或 1、2 、4、6、8 GB。
4
SD Card Introduction 用戶可以使用一個USB的讀卡器,在個人電腦上使用SD卡。某些新型電腦上已經內置了讀卡裝置。
最新的發展是SD內建了USB插口,省略了讀卡器。San Disk的設計是使用一個可摺疊的護套來保護USB插口。
5
SD Card Application SD卡多應用於 MP3隨身聽 數位相機:儲存相片及短片 數位攝影機:儲存相片及短片
個人數位助理(PDA):儲存各類資料 手機:儲存相片、鈴聲、音樂、短片等資料
6
SDIO Card Introduction
SDIO,意即Secure Digital Input/Output,所謂「支援SDIO」的機種,其SD擴充槽除了能使用SD記憶卡外,也可支援SD介面的輸出入設備,例如無線網路卡、藍芽卡、GPS接收器、數位相機卡、FM廣播卡、電視接收器、數據機、指紋辨識器等。
7
SDIO Card Introduction
比起使用USB插槽,使用SDIO卡耗電量低,並且適用於各種行動式的平台。 同樣是數位裝置,支援SDIO的 機種只要插入SDIO擴充卡,就 能增加各種不同的功能,例如 NB搭配無線網卡以及PDA搭配 GPS接收器,就是目前極受使 用者青睞的實用方案。
8
Technology Explanation
所有SD和SDIO卡都必須支援較老的SPI/MMC模式。這個模式支援慢速的四線序列介面(時鐘、序列輸入,序列輸出,晶片選擇),相容於序列終端介面(SPI)和許多微控制器。 SD卡共支援三種傳輸模式: - SPI模式(獨立序列輸入和序列輸出), - 1位元SD模式 (獨立指令和資料通道,獨有的傳輸格式) - 4位元SD模式 (使用額外的針腳以及某些重新設置的針腳。 支持四位寬的平行傳輸)。
9
Technology Explanation
大部分數位相機,數位音頻播放器和其他便攜設備僅能使用MMC模式。有關這一模式的詳細文檔可以從MMCA購買,價格是500美元。但是部分有關SDIO的文檔是免費的。有些還可以從存儲卡廠商處獲得。 MMC模式不支持SD卡的加密特性。從免費的文檔裏也找不到這些細節。但對於大多數消費者來講,這無關痛癢,用戶制式用來儲存不受保護的數據。
10
Other MMC / SD Card SD Card 不是Secure Digital Card Association(安全數字卡聯盟)批准的唯一一種記憶卡。其他批准的格式包括miniSD、 microSD(在聯盟未通過標準前稱為TransFlash)和SDHC。 這些更小的卡加上一個適配器也能用在全尺寸的 MMC/SD/SDIO 插槽上。要知道開發出SD尺寸的輸入輸出設備標準已經很難了,再想開發更小尺寸的簡直就不太現實了。
11
Other MMC / SD Card SD插槽支持MMC卡,更小尺寸的MMC卡變種也能相容於支援SD卡的設備。與miniSD 和 microSD不同的是, RS-MMC 插槽可以相容全尺寸的MMC卡。因為 RS-MMC卡只是縮短了的MMC卡。 因應SD卡的標準容量上限只有4GB,不足以應付日益上升的容量需求,聯盟制定了新的SDHC標準。SDHC卡的外型跟普通的SD卡完全相同,而容量的下限為4GB,預料年內可推出高達32GB的SDHC卡。
12
Standard 與其它存儲卡格式一樣,SD卡也有眾多的專利和註冊商標保護,授權只能由安全數字卡聯盟進行。安全數字卡聯盟現在的授權協議並不允許開放原始碼的SD驅動程序,這種狀況產生了很多關於開放原始碼和免費軟件的爭論。通行的做法是開發一個開放原始碼的外殼,但核心是針對特定平臺的封閉原始碼SD驅動程序,這種做法與期望的開放標準差異太大。另一種通行的做法是採用較老的MMC模式,因為根據SD卡標準,所有的SD卡都必須支持MMC模式。 這說明SD卡的開放度比CF卡或閃存低,上述兩種格式幾乎免費,僅需要使用聯盟標誌和註冊商標的授權費。但比xD卡或記憶棒的開放度高得多,這兩種格式根本不提供公開文件支援。
13
Comparison With Other Memory Card
類型 MMC RS-MMC MMCPlus SecureMMC SD SDIO miniSD microSD SD插槽 是 機械適配器 電子-機械適配器 PIN 7 13 9 11 8 外形規格 薄 薄/短 厚 窄/短/薄 窄/短/超薄 SPI模式 可選 支持 1 BIT 4bit module 否 ? 8bit module Support DRM* N/A *DRM:數位著作權管理
14
State Diagram
15
Card Initialization
17
SD Memory Card Functional Description
Command
18
Command Types Four kinds of commands defined to control the SD Memory Card: Broadcast commands (bc), no response - The broadcast feature is only if all the CMD lines are connected together in the host. If they are separated, then each card will accept it separately in its turn. Broadcast commands with response (bcr) response from all cards simultaneously - Since there is no Open Drain mode in SD Memory Card, this type of command shall be used only if all the CMD lines are separated - the command will be accepted and responded by every card separately. Addressed (point-to-point) commands (ac) no data transfer on DAT Addressed (point-to-point) data transfer commands (adtc) data transfer on DAT
19
Command Types All commands have a fixed code length of 48 bits
20
Command Format A command always starts with a start bit (always 0), followed by the bit indicating the direction of transmission (host = 1). The next 6 bits indicate the index of the command, this value being interpreted as a binary coded number (between 0 and 63). Some commands need an argument (e.g. an address), which is coded by 32 bits.
21
Command Format A value denoted by ‘x’ in the table above indicates this variable is dependent on the command. All commands are protected by a CRC Every command codeword is terminated by the end bit (always 1). All commands and their arguments are listed in Table 4-18-Table 4-27.(Reference: SD Spec. p.49)
22
SD Memory Card Functional Description
Cyclic Redundancy Code (CRC)
23
CRC7 The CRC7 check is used for all commands, for all responses except type R3, and for the CSD and CID registers. The CRC7 is a 7-bit value and is computed as follows: Generator polynomial: G(x) = x7 + x3 + 1. M(x) = (first bit) * xn + (second bit) * xn (last bit) * x0 CRC[6...0] = Remainder [(M(x) * x7)/G(x)] The first bit is the most left bit of the corresponding bit string (of the command, response, CID or CSD). The degree n of the polynomial is the number of CRC protected bits decreased by one. The number of bits to be protected is 40 for commands and responses (n = 39), and 120 for the CSD and CID (n = 119).
24
CRC7 CRC7 Examples The CRC section of the command/response is bolded.
25
SPI Mode Transaction Packets -Command Tokens
26
Command Format All the SD Memory Card commands are 6 bytes long. The command transmission always starts with the left most bit of the bit string corresponding to the command codeword.
27
Command Format All commands are protected by a CRC
The commands and arguments are listed in Table 7-3. (Reference: SD Spec. p.102)
28
CMD0
29
SD Memory commands and the equivalent SDIO commands
CMD0 SDIO Command CMD52 (write to I/O reset in CCCR) Comment The reset command (CMD0) is only used for memory or the memory portion of Combo cards. In order to reset an I/O only card or the I/O portion of a combo card, use CMD52 to write a 1 to the RES bit in the CCCR (bit 3 of register 6). Note that in the SD mode, CMD0 is only used to indicate entry into SPI mode and shall be supported. An I/O only card or the I/O portion of a combo card is not reset with CMD0
30
Reset for SDIO(CMD0) In order to reset all functions within an SDIO card or the SDIO portion of a combo card, a method different than that used for SD memory is defined. The reset command (CMD0) is only used for memory or the memory portion of Combo cards. In order to reset an I/O only card or the I/O portion of a combo card, use CMD52 to write a 1 to the RES bit in the CCCR (bit 3 of register 6). Note that in the SD mode, CMD0 is only used to indicate entry into SPI mode and shall be supported. An I/O only card or the I/O portion of a combo card is not reset by CMD0
31
SPI Mode Transaction Packets
32
Command and Argument (SPI bus commands) (SD Memory Card)
Command Index CMD0 SPI Mode Yes Argument [31:0] stuff bits Response R1 Abbreviation GO_IDLE_STATE Command Description Resets the SD Memory Card Example: the content of the command index field is (binary) ‘000000’ for CMD0
33
CMD 0 Bit position 47 46 [45:40] [39:8] [7:1] Width (bits) 1 6 32 7
Width (bits) 1 6 32 7 Value ‘0’ ‘1’ ‘000000’ ignore X Description Start bit Transmission bit Command index Stuff bits CRC7 End bit
34
Format of Response R1 This response token is sent by the card after every command with the exception of SEND_STATUS commands. It is one byte long, and the MSB is always set to zero. The other bits are error indications, an error being signaled by a 1.
35
Format of Response R1 The structure of the R1 format is given in Figure 7-9. The meaning of the flags is defined as following:
36
Format of Response R1 In idle state: The card is in idle state and running the initializing process. Erase reset: An erase sequence was cleared before executing because an out of erase sequence command was received.
37
Format of Response R1 Illegal command: An illegal command code was detected. Communication CRC error: The CRC check of the last command failed. Erase sequence error: An error in the sequence of erase commands occurred.
38
Format of Response R1 Address error: A misaligned address that did not match the block length was used in the command. Parameter error: The command’s argument (e.g. address, block length) was outside the allowed range for this card.
39
SPI Mode Status Bits (In Idle state)
Identifier In Idle state Type S R Value 0 = Card is ready 1 = Card is in idle state Description The card enters the idle state after power up or reset command. It will exit this state and become ready upon completion of its initialization procedures. Clear Condition A
40
SPI Mode Status Bits (Erase reset)
Identifier Erase reset Type S R Value ’0’= cleared ’1’= set Description An erase sequence was cleared before executing because an out of erase sequence command was Received Clear Condition C
41
SPI Mode Status Bits (Illegal command)
Identifier Illegal command Type E R Value ’0’= no error ’1’= error Description Command not legal for the card state Clear Condition C
42
SPI Mode Status Bits (Com CRC error)
Identifier Com CRC error Type E R Value ’0’= no error ’1’= error Description The CRC check of the command failed. Clear Condition C
43
SPI Mode Status Bits (Erase sequence error)
Identifier Erase sequence error Type E R Value ’0’= no error ’1’= error Description An error in the sequence of erase commands occurred. Clear Condition C
44
SPI Mode Status Bits (Address error)
Identifier Address error Type E R X Value ’0’= no error ’1’= error Description A misaligned address which did not match the block length was used in the command. Clear Condition C
45
SPI Mode Status Bits (Parameter error)
Identifier Parameter error Type E R X Value ’0’= no error ’1’= error Description An error in the parameters of the command. Clear Condition C
46
SPI Mode Status Bits 1) Type: E: Error bit. S: State bit.
R: Detected and set for the actual command response. X: Detected and set during command execution The host can get the status by issuing a command with R1 response. 2) Clear Condition: A: According to the current state of the card. C: Clear by read
47
CMD5
48
Format of CMD5 The IO_SEND_OP_COND Command contains the following fields: S (start bit) Start bit. Always 0 D (direction) Direction. Always1 indicates transfer from host to card. Command Index Identifies the CMD5 command with a value of b
49
Format of CMD5 The IO_SEND_OP_COND Command contains the following fields: Stuff Bits Not used, shall be set to 0. I/O OCR Operation Conditions Register. The supported minimum and maximum values for VDD.
50
Format of CMD5 The IO_SEND_OP_COND Command contains the following fields: CRC7 7 bits of CRC data E (end bit) End bit, always 1
51
Value of CMD5 Bit position 47 46 [45:40] [39:32] [31:8] [7:1]
Width(bits) 1 6 8 24 7 Value ‘0’ ‘1’ ‘000101b’ ‘ ’ ‘ ’ X Description Start bit Transmission bit Command index Stuff bits I/O OCR CRC7 End bit
52
Value of CMD5 1*: OCR Values for CMD5 15 2.7 – 2.8 16 2.8 – 2.9 17
I/O OCR bit Position VDD Voltage Window (in Volts) 15 2.7 – 2.8 16 2.8 – 2.9 17 2.9 – 3.0 18 3.0 – 3.1 19 3.1 – 3.2 20 3.2 – 3.3 21 3.3 – 3.4 22 3.4 – 3.5 23 3.5 – 3.6
53
The IO_SEND_OP_COND Response (R4)
An SDIO card receiving CMD5 shall respond with a SDIO unique response, R4. The format of R4 for both the SD and SPI modes is:
54
The IO_SEND_OP_COND Response (R4)
The Response, R4 contains the following data: S (start bit) Start bit. Always 0 D (direction): Direction. Always 0. Indicates transfer from card to host. Reserved: Bits reserved for future use. These bits shall be set to 1.
55
The IO_SEND_OP_COND Response (R4)
The Response, R4 contains the following data: C Set to 1 if Card is ready to operate after initialization I/O OCR Operation Conditions Register. The supported minimum and maximum values for VDD. Memory Present Set to 1 if the card also contains SD memory. Set to 0 if the card is I/O only.
56
The IO_SEND_OP_COND Response (R4)
The Response, R4 contains the following data: Number of I/O Functions Indicates the total number of I/O functions supported by this card. The range is 0-7. (Note that the common area present on all I/O cards at Function 0 is not included in this count. The I/O functions shall be implemented sequentially beginning at function 1.)
57
The IO_SEND_OP_COND Response (R4)
Modified R1: The SPI R1 response byte as described in the SD Physical Specification modified for I/O as follows: Stuff Bits: Not used, shall be set to 0.
58
Number of I/O functions
Value of R4 (SPI Mode) Bit position [39:32] 31 [30:28] 27 [26:24] [23:0] Width (bits) 8 1 3 24 Value *a ‘0?0???0?’ ‘1’ ‘101’ ‘0’ ‘000’ ‘ ’ Description Modified R1 C Number of I/O functions Memory present Stuff bits I/O OCR
59
CMD8
60
Introduction to CMD8 SEND_IF_COND (CMD8) is used to verify SD Memory Card interface operating condition. The card checks the validity of operating condition by analyzing the argument of CMD8 and the host checks the validity by analyzing the response of CMD8 (See Chapter ).
61
Send Interface Condition Command (CMD8)
CMD8 (Send Interface Condition Command) is defined to initialize SD Memory Cards compliant to the Physical Specification Version 2.00. CMD8 is valid when the card is in Idle state. This command has two functions. Voltage check: Checks whether the card can operate on the host supply voltage. Enabling expansion of existing command and response: Reviving CMD8 enables to expand new functionality to some existing commands by redefining previously reserved bits.
62
Format of CMD8 Application Note: It is recommended to use ‘ b’ for the ‘check pattern’.
63
Basic Command of SD Memory Card bus Commands
Command Index CMD8 Type bcr Argument [31:12]reserved bits [11:8]supply voltage(VHS) [7:0]check pattern Resp R7 Abbreviation SEND_IF_COND Command Description Sends SD Memory Card interface condition, which includes host supply voltage information and asks the card whether card supports voltage. Reserved bits shall be set to '0'.
64
Card Operation for CMD8 in SPI mode
In SPI mode, the card always returns response. Table 7-5 shows the card operation for CMD8.
65
Format of Response R7 This response token is sent by the card when a SEND_IF_COND command (CMD8) is received. The response length is 5 bytes. The structure of the first (MSB) byte is identical to response type R1. The other four bytes contain the card operating voltage information and echo back of check pattern in argument and are specified by the same definition as R7 response in SD mode.
66
R1(assume in idle state)
Value of R7 (CMD8) Bit position [39:32] [31:28] [27:12] [11:8] [7:0] Width (bits) 8 4 16 Value ’01h’ ‘0000’ ‘0000h’ ‘0001b’ ‘ b’ Description R1(assume in idle state) Command version Reserved bits Voltage accepted Check pattern
67
CMD52
68
Format of CMD52 缺 register address (17 bits) Bit position 47 46
[45:40] 39 [38:36] 35 34 [33:17] 16 [15:8] [7:1] Width (bits) 1 6 3 17 8 7 Value ‘0’ ‘1’ ‘110100b’ *a *e *b *c *d x Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit 缺 register address (17 bits)
69
Value of CMD52 *a: 0 => read data 1 => write data,
data address = specified by the Function Number & the Register Address to the host 1 => write data, to address = I/O location (by the Function Number) & the Register Address
70
Value of CMD52 *b: *c: 1 => then R/W=1, write then read
0 => read then write *c: This is the address of the byte of data inside of the selected function to read or write.
71
Value of CMD52 *d: For a direct write command (R/W=1)
this is the byte that is written to the selected address. For a direct read (R/W=0) this field is not used and shall be set to 0.
72
Value of CMD52 *e: (Our definition) Value Function 功能 ‘001’ Fuction1
設定時間 ‘010’ Function2 切換時區 ‘011’ Function3 設定鬧鐘 ‘100’ Function4 顯示鬧鐘/時間 ‘101’ Function5 關掉鬧鐘
73
Format of R5(CMD52) Bit position [15:8] [7:0] Width (bits) 8 Value
Description Modified R1 (in ready state) R/W Data ( data been read )
74
Value of R5(CMD52) *a : The SPI R1 response byte as described in the SD Physical Specification modified for I/O as follows:
75
Value of R5(CMD52) R/W=1, RAW=1: R/W=1, RAW=0: R/W=0:
The value read from the addressed register. In this case, the read-back data may not be the same as the data written to the register, depending on the design of the hardware. R/W=1, RAW=0: the data in this field shall be identical to the data byte in the write command. R/W=0: the actual value read from that I/O location is returned in this field.
76
Common I/O Area Structure
77
Common I/O Area (Function 0)
Card Common Control Register(CCCR) allow quick host checking and enable/disable interrupt/function Function Basic Register(FBR) Each function has 256 bytes area that allow host determine the abilities and requirements of each function Card Information Structure (CIS) Provides more Complete information about the card and each function 主要有三個Register structure Support function 0 --
78
Card Command Control Register
79
CCCR Overall Register Map
80
Address 0X00: SD Revision Bit R/W Represent Value 3 ~ 0 Read only
These 4 bits contain the version of the CCCR and FBR format that this card supports. CCCR/FBR Version 1.00 CCCR/FBR Version 1.10 CCCR/FBR Version 1.20 0011 to Reserved for Future Use 7 ~ 4 Read only These 4 bits contain the version of the SDIO Specification that this card supports. 0000 SDIO Specification Version 1.00 0001 SDIO Specification Version 1.10 0010 SDIO Specification Version 1.20 (unreleased) 0011 SDIO Specification Version 2.00 Reserved for Future Use
81
Address 0X01: SD Specification Revision
Bit R/W Represent Value 3 ~ 0 Read only These 4 bits contain the version of the SD Physical Specification that this card supports. 0000 SD Physical Specification Version 1.01 (March 2000) 0001 SD Physical Specification Version 1.10 (October 2004) 0010 SD Physical Specification Version 2.00 (May 2006) Reserved for Future Use 7 ~ 4 Reserved for Future Use
82
Address 0X02: I/O Enable Bit R/W Represent Value
Reserved for Future Use 7 ~ 1 The completion of initialization is indicated in IORx. On power up or after a reset, the card shall reset this bit to 0. The host can also use IOEx as a per function reset for error recovery. The host sequence for a per function reset is to reset IOEx to 0, wait until IORx becomes 0 and then set IOEx to 1 again. If the bit is reset to 0, the function is disabled. If the bit is set to 1, the function is enabled to start its initialization.
83
Address 0X03: I/O Ready Bit R/W Represent Value
Reserved for Future Use 7 ~ 1 Read only (Supplement) The functions shall set this bit to 1 within the timeout value defined in the TPLFE_ENABLE_TIMEOUT_VAL tuple. On power up or after a reset, this bit shall be set to 0. For any function that is not implemented on an SDIO card, this bit shall always be 0 If this bit is reset to 0, the function is not ready to operate. If this bit is set to 1, the function is ready to operate.
84
Address 0X04: Interrupt Enable
Bit R/W Represent Value Interrupt Enable Master. If this bit is cleared to 0, no interrupts from this card shall be sent to the host. If this bit is set to 1, then any function’s interrupt shall be sent to the host 7 ~ 1 Interrupt Enable for function(1-7) If the bit is cleared to 0, any interrupt from this function shall not be sent to the host. If this bit is set to 1, then this function’s interrupt shall be sent to the host if the master Interrupt Enable (bit 0) is also set to 1.
85
Address 0X05: Interrupt Pending
Bit R/W Represent Value Reserved for Future Use 7 ~ 1 Read Only Interrupt Pending for function (1-7) Note that if the IENx or IENM bits are not set, the host cannot receive this pending interrupt. If this bit is cleared to 0, this indicates that no interrupts are pending from this function. If this bit is set to 1, then this function has interrupt pending.
86
Address 0X06: I/O Abort Bit R/W Represent Value 2 ~ 0 Write only
Abort Select In order to abort an I/O read or write and free the SD bus. (Note) the function that is currently transferring data must be addressed. These 3 bits define which function’s transfer to stop. (Example) the abort the transfer to function number 3, the value of 0x03 would be written to these bits using CMD52 only. If the abort is addressed to a suspended function, it does not affect current data transaction. 3 I/O CARD RESET Setting the RES to 1 shall cause all I/O functions in an SDIO or Combo card to perform a soft reset. 7 ~ 4 Reserved for Future Use
87
Address 0X07: Bus Interface
Bit R/W Represent Value 1 ~ 0 Defines the data bus width to be used for data transfer. All Full-Speed SDIO cards support both 1 and 4-bit bus. ’00’=1-bit or’10’=4-bit bus 4 ~ 2 Reserved for Future Use 5 Enable Continuous SPI Interrupt. “1”, then this R/W bit is used to allow the SDIO card to assert the interrupt line in the SPI mode at any time. This bit is cleared to “0” on reset or power-up. 6 Read only Support Continuous SPI interrupt. “1” to indicate that this SDIO card supports the assertion of interrupts in the SPI mode at any time. “0” , then this SDIO card can only assert the interrupt line in the SPI mode when the CS line is asserted 7 CD Disable Connect[0]/Disconnect[1] the 10K-90K ohm pull-up resistor on CD/DAT[3] (pin 1) of the card.
88
Address 0X08: Card Capability (2 of 2)
Bit R/W Represent Value 4 Read only Supports interrupt between blocks of data in 4-bit SD mode. This flag bit reports the SDIO card’s ability to generate interrupts during a 4-bit multi-block data transfer If this bit is 0, then the SDIO card is not able to signal an interrupt during a multi-block data transfer in 4-bit mode If this bit is 1, then the SDIO card is able to signal an interrupt between blocks while data transfer is in progress. 5 Enable interrupt between blocks of data in 4-bit SD mode. Enable the multi-block IRQ during 4-bit transfer for the SDIO card. 0, the card shall not signal interrupts during a 4-bit multi-block data transfer 1, the card shall generate interrupts during 4 bit multi-block data transfers 6 Card is a Low-Speed card or not 1 – low-speed card 0 – full-speed card 7 4-bit support for Low-Speed cards 1 – LSC = 1 & supports 4-bit data transfer 0 – otherwise
89
Address 0X08: Card Capability (1 of 2)
Bit R/W Represent Value Read only Card Supports Direct Commands during data transfer. This bit applies only to the SD modes, it does not apply to SPI mode. 1 ICard Supports Multi-Block. This flag bit reports the SDIO card’s ability to execute the IO_RW_EXTENDED command (CMD53) in the block mode. If this bit is set, all I/O functions (0-7) shall accept and execute CMD53 with the optional block mode bit set. 2 Card Supports Read Wait. This bit applies only to the SD modes, it does not apply to SPI mode 3 Card supports Suspend/Resume. This bit applies only to the SD modes, it does not apply to SPI mode.
90
Address 0X09 ~ 0X0B: Common CIS Pointer
Bit R/W Represent Value 7 ~ 0 Read only This 3-byte pointer points to the start of the card’s common CIS. A card common CIS is mandatory for all SDIO cards. This pointer is stored in little-endian format (LSB first). The common CIS contains information relation to the entire card. The card common CIS shall be located within the CIS space of function 0 (0x x017FFF)
91
Address 0X0C: Bus Suspend
Bit R/W Represent Value Read only Bus status 1, then the currently addressed function is currently executing a command which transfers data on the DAT[x] line(s). 0, then the addressed function is not using the data bus. 1 Bus Release Request/Status 1, the addressed function shall temporarily halt data transfer on the DAT[x] lines and suspend the command that is in process. 7 ~ 2 Reserved for future use
92
Address 0X0D: Function Select
Bit R/W Represent Value 3 ~ 0 Select Function bits 3:0 0000 : Transaction of function 0 (CIA) : Transaction to functions 1-7 1000: Transaction of memory in combo card : Not defined, reserved for future use 6 ~ 4 Reserved for future use 7 Read only Resume Data Flag If DF is set to 1, then there is more data to transfer that will begin after the function or memory in resumed. If DF=0, the function or memory was suspended at end of data transfer (during busy)
93
Address 0X0E: Exec Flags Bit R/W Represent Value 7 ~ 0 Read only
Execution Flag. These bits are used by the host to determine the current execution status of all functions (1-7) and memory (0). The bit is set to 1 for each function or memory that is currently executing a command. These bits are only defined if SBS=1 If SBS=0 these bits shall be read as zero.
94
Address 0X0F: Ready Flags
Bit R/W Represent Value 7 ~ 0 Read only Ready Flag bits. These bits tell the host the read or write busy status for functions (1-7) and memory (0). If the RFx bit is set to 1, then the function/memory can accept write data. if the RFx bit is cleared to 0, it indicates that read data is NOT available.
95
Address 0X10 ~ 0X11: Function 0 block size
Bit R/W Represent Value 10[7..0] 11[7..0] This 16-bit register sets the block size for I/O block operations for Function 0 only. The maximum block size is 2048 (0x0800) and the minimum is 1.
96
Address 0X12: Power Control
Bit R/W Represent Value Read only Support Master Power Control These bits tell the host if the card supports Master Power Control 0 : The total card current is less than 200mA 1 :The total card current may exceed 200mA. 1 Enable Master Power Control 0(default): The total card current shall be less than 200mA. 1: The total card current may exceed 200mA and SPS and EPS are available 7~2 Reserved for Future Use
97
Address 0X13: High-Speed Bit R/W Represent Value Read only
Read only Support High-Speed 0: The card does not support High-Speed mode 1: The card supports High-Speed mode. 1 Enable High-Speed 0 (default): The card operates in default timing mode with a clock rate up to 25MHz. 1 : High-Speed Mode 7~2 Reserved for Future Use
98
Address 0X14 ~ 0XEF: RFU
99
Address 0XF0~ 0XFF: Reserved for Vendors
These 16 registers are reserved for the maker of the I/O card to be used for any operations that are defined by and specific to any vendor unique operation.
100
Common I/O Area Structure
101
Common I/O Area (Function 0)
Card Common Control Register(CCCR) allow quick host checking and enable/disable interrupt/function Function Basic Register(FBR) Each function has 256 bytes area that allow host determine the abilities and requirements of each function Card Information Structure (CIS) Provides more Complete information about the card and each function 主要有三個Register structure Support function 0 --
102
Function Basic Register (FBR)
Function 1-7 Register Mapping
103
FBR (Function 1-7) Function 1-7 有著相同的Structure, 在此舉其中Function1 作為例子
0X100 to OX1FF 共256 bytes
104
Function 1: Address 0X100 Function 2-7 Address = 0X(2..7)00 Bit R/W
Represent Value 3 ~ 0 Read only SDIO Function Interface code 顯示此Function 有Support的I/O Interface 0000: No supported function : Support Standard UART 0010: Type-A Bluetooth : Type-B Bluetooth 0100: Support GPS : Support Camera 0110: Support PHS : Support WLAN 1000: Embedded SDIO-ATA 1111: Support other interface(Specified in 0x101) 4 & 5 RFU 6 Read Only Whether this function support Code Storage Area(CSA) 1: Yes 0: No 7 Enable function CSA 1: Enable 0: Disable (R/W CSA will be blocked)(initial value)
105
Function 1: Address 0X101 Function 2-7 Address = 0X(2..7)01 Bit R/W
Represent Value 7 ~ 0 Read only Extended SDIO Function Interface code 當address 0X100的[3..0]為1111,則此8 bits 有意義 Undefined, if 0X100[3..0] != 1111 => 預設為
106
Function 1: Address 0X102 Function 2-7 Address = 0X(2..7)02 Bit R/W
Represent Value Read only Support Power Selection(SPS) 0: no power selection (EPS=0) 1: has 2 power mode that could be selected by EPS 1 Enable Power Selection(EPS) 0(Default) : Higher Current Mode(Maximum current = TPLFE_HP_MAX_PWR_3.3V) 1: Lower Current Mode(Maximum current = TPLFE_LP_MAX_PWR_3.3V) 7 ~ 2 RFU
107
Function 2-7 Address = 0X(2..7)03 – 0X(2..7)08
Bit R/W Represent Value 7 ~ 0 RFU
108
Function 1: Address 0X109-0X10B
Bit R/W Represent Value 0X10B[7..0] + 0X10A[7..0] 0X109[7..0] 共24bits Read Only Address pointer to function CIS (只有最後17bits有作用,其中0X10B[7..1] always zero) 1. CIS為每個Function皆有的Structure 2. Store in liitle-endian format(LSB first) 3. If the card doesn’t support CIS, then pointer value = End of Chain tuple Address to CIS
109
Function 1: Address 0X10C-0X10E
Bit R/W Represent Value 0X10E[7..0] + 0X10D[7..0] 0X10C[7..0] 共24bits Address pointer to function CSA 1. After any R/W to CSA access window, this pointer will be increased 1 automatically 2. If this function does not support CSA(0x100 bit 6 = 0), then this 24 bits shall read as 0X000000 3. . Store in liitle-endian format(LSB first) Address to CSA
110
Function 1: Address 0X10F Function 2-7 Address = 0X(2..7)0F Bit R/W
Represent Value 7~0 Data access window to CSA Any R/W to this address when CSA is enable ,shall pass data to/from the address by CSA address pointer(0X10C~0X10E) When 0x100[7] = 1 Contain data written to CSA imminently When 0X100[7] = 0 =>Always
111
Function 2-7 Address = 0X(2..7)10 ~ 0X(2..7)11
Bit R/W Represent Value 0X111[7..0] + 0X110[7..0] 共16 bits Function 1 I/O Block SIZE 1. Before use it, user should set appropriate value 2. Store in little-endian format Maximum Value is 2048(0X0800) Minimum Value is 1 (0X0001) Initial value = 0X0000 When the card doesn’t support I/O operation Read only and always 0X0000
112
Function 1: Address 0X112-0X1FF
Bit R/W Represent Value 0X112 – 0X1FF RFU
113
Common I/O Area(Function 0)
Card Common Control Register(CCCR) allow quick host checking and enable/disable interrupt/function Function Basic Register(FBR) Each function has 256 bytes area that allow host determine the abilities and requirements of each function Card Information Structure (CIS) Provides more Complete information about the card and each function 主要有三個Register structure Support function 0 --
114
Function 用法
115
Function 1 Function 1 : 設定時間
Address x reset_rtc 0x TH 0x H 0x TM 0x M 0x TS 0x S
116
Function 2 Function 2 :切換時區
Address x change_city 0x city0 0x city1
117
Function 3 Function 3 :設定鬧鐘
Address x set_alarm 0x TH 0x H 0x TM 0x M 0x TS 0x S
118
Function 4 & 5 Function 4 :顯示鬧鐘時間 Function 5 :取消在響的鬧鐘
Address x show_sel Function 5 :取消在響的鬧鐘 Address x cancel_pending 0x alarm_pending
119
Data Trasmission Method
這是我們所有有用到的傳輸方式
120
Operation Between Command
121
read_ command 讀command 是每8bit讀一次的
122
CMD0 Bit position 47 46 [45:40] [39:8] [7:1] Description Start bit
Description Start bit Transmission bit Command index Stuff bits CRC7 End bit
123
R1 (CMD0) Bit position 7 6 5 4 3 2 1 Description MSB Parameter error
Description MSB Parameter error Address error Erase sequence error Com crc error Illegal command Erase reset(by cmd8) In idle state
124
CMD8 Bit position 47 46 [45:40] [39:20] [19:16] [15:8] [7:1]
Description Start bit Transmission bit Command index Reserved bits Voltage supplied(VHS) ( V) Check pattern CRC7 End bit
125
R7 (CMD8) Bit position [39:32] [31:28] [27:12] [11:8] [7:0]
Description R1(assume in idle state) Command version Reserved bits Voltage accepted Check pattern
126
CMD5(1) Bit position 47 46 [45:40] [39:32] [31:8] [7:1] Description
Description Start bit Transmission bit Command index Stuff bits I/O OCR CRC7 End bit
127
R4 (CMD5(1)) Bit position [39:32] 31 [30:28] 27 [26:24] [23:0]
Description Modified R1 C Number of I/O functions Memory present Stuff bits I/O OCR
128
CMD5(2) Bit position 47 46 [45:40] [39:32] [31:8] [7:1] Description
Description Start bit Transmission bit Command index Stuff bits I/O OCR CRC7 End bit
129
R4 (CMD5(2)) Bit position [39:32] 31 [30:28] 27 [26:24] [23:0]
Description Modified R1 C Number of I/O functions Memory present Stuff bits I/O OCR
130
illegal command Bit position 47 46 [45:40] [39:32] [31:8] [7:1]
Description Start bit Transmission bit Command index Stuff bits I/O OCR CRC7 End bit
131
illegal command
132
address error Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
133
address error
135
SDIO Card Implementation
137
RTC
138
Real Time Clock (RTC)
139
Main Functionality 由輸入的clock隨時計算現在的時間 設定時間之後,讀進控制元件的時間資料,輸出每一秒的正確時間
Frequency Divider clk_50KHz clk_1Hz rtc_in[19:0] reset rtc_out[19:0]
140
Clock Frequency Divider Clock clk_50KHz clk_1Hz rtc_in[19:0] reset
rtc_out[19:0]
141
Clock RTC register 記住TH, H, TM, M, TS, S 的資訊 做進位判斷 Frequency Divider
clk_50KHz clk_1Hz rtc_in[19:0] reset rtc_out[19:0] RTC register 記住TH, H, TM, M, TS, S 的資訊 做進位判斷 TH H TM M TS S [01] [1001] [101] [1000] [011] [0000] →19:58:30
142
Frequency Divider Clock Clock Frequency Divider Clock
clk_50KHz clk_1Hz rtc_in[19:0] reset rtc_out[19:0] Clock Frequency Divider clk_50KHz clk_1Hz rtc_in[19:0] reset rtc_out[19:0]
143
Frequency Divider 將input clock除頻成1Hz Frequency Divider Clock clk_50KHz
clk_1Hz rtc_in[19:0] reset rtc_out[19:0] 將input clock除頻成1Hz
144
Frequency Divider 在reset的時候,重新計算1Hz的計數器 RESET Frequency Divider Clock
25000 Frequency Divider Clock Frequency Divider clk_50KHz clk_1Hz rtc_in[19:0] reset rtc_out[19:0] 在reset的時候,重新計算1Hz的計數器 RESET
145
23:59:59 00:00:00 00:00:01
146
alarm
147
Alarm
148
Design idea Input: 1. rtc_data (現在時間) 2. alarm_data (鬧鐘設定時間)
3. control Control(0) => rtc_enable Control(1) => set Control(2) => cancel
149
Design idea Output: 1. alarm_pending (“1”表示鬧鈴在響;”0”表示鬧鈴沒有在響)
2. alarm_data_o (把接收到的鬧鐘設定時間送出去)
150
Main Functionality 這個architecture最主要就是判斷線在鬧鈴是否在響。
。不使用鬧鐘功能(set = 0)=> 不會響。 。rtc沒有在工作(rtc_enable = 0)=>不會響。 。取消鬧鈴鍵是被按下的(cancel = 1)=>不會響。 。set = 1,rtc_enable = 1, cancel = 0 => 若現在時間和鬧鐘設定的時間相同=>開始響。 => set變成0,rtc_enable變成0, cancel變成1 => 停止。
151
State Diagram of Alarm At pending
1) [match = 1 or 0,set = 1,rtc_enable = 1,cancel = 0] => pending 2) other situation => not_pending At not_pending 1) [match = 1 ,set = 1,rtc_enable = 1,cancel = 0] => pending
152
Testbench of Alarm 當現在時間和鬧鐘設定時間一樣時, control各種情況的simulation cancel Set
Rtc_enable
153
Testbench of Alarm 在60ns時,現在時間和鬧鐘設定時間變不同,但是沒有取消,所以鬧鈴繼續響。在70ns時,取消鈕被按下(control[2]變成1),所以鬧鈴停止。 cancel Set Rtc_enable
154
change change
155
切換時區
156
Main Functionality 提供切換時區的功能,將RTC和alarm output的時間做時區處理
將經過時區處理的time data加上欲顯示的時區代碼後傳送給LCD
157
Design Idea 先挑選出一定數量的時區代表城市作為對換資料,判斷現在時間的城市時區,與要變換的城市時區做比較,將其作時差的加減對應而換算到新城市的時間 留意進位、退位和前後天(如超過24小時)的時間換算顯示 1 000001 UTC-11 Niue 2 000010 UTC-10 Hawaii 3 000011 UTC-9:30 POM 4 000100 UTC-9 Alaska 5 000101 UTC-8 PST 6 000110 UTC-7 Texas 7 000111 UTC-6 Florida 8 001000 UTC-5 New York 9 001001 UTC-4:30 Venezuela 10 001010 UTC-4 Paraguay 11 001011 UTC-3:30 Labrador 12 001100 UTC-3 Argentina 13 001101 UTC-2 SSI 14 001110 UTC-1 Praia 15 001111 UTC London 16 010000 UTC+1 Paris 17 010001 UTC+2 Alexandria 18 010010 UTC+3 Moscow 19 010011 UTC+3:30 Iran 20 010100 UTC+4 Baku 21 010101 UTC+4:30 Herat 22 010110 UTC+5 Pakistan 23 010111 UTC+5:30 India 24 011000 UTC+5:45 Nepal 25 011001 UTC+6 Bengal 26 011010 UTC+6:30 Myanmar 27 011011 UTC+7 Thailand 28 011100 UTC+8 Taiwan 29 011101 UTC+8:45 Caiguna 30 011110 UTC+9 Japan 31 011111 UTC+9:30 Broken Hill 32 100000 UTC+10 Guam 33 100001 UTC+10:30 LordHoweIsl. 34 100010 UTC+11 Solomon 35 100011 UTC+11:30 NorfolkIsl. 36 100100 UTC+12 New Zealand 37 100101 UTC+12:45 ChathamIsl. 38 100110 UTC+13 Tonga
158
Flow of Change City Input reset time data Reset time New time data
New city time data Original city time data no change reset Reset time no reset Change city change
159
Testbench of Change City
Input time data:UTC+4 Baku 7:49:38 Case 1:change to UTC-4:30 Venezuela Output time data1: 23:19:38 ----時區大換時區小(+ 24小時制變換) Case 2:change to UTC+12:45 Chathamlsl Output time data2: 16:34:38 ----時區小換時區大(+ 時、分的進退位)
160
Reset:city0 20 010100 UTC+4 Baku Output: City TH H TM M TS S
[010100][000000] [00] [0111] [100] [1001] [011] [1000] Reset 32’b0
161
Case 1:UTC+4 Baku UTC-4:30 Venezuela 7:49:38 23:19:38
Output: city TH H TM M TS S [001001] [000000] [10] [0011] [001] [1001] [011] [1000] New minute New hour
162
Case 2:UTC+4 Baku UTC-4:30 Chathamlsl 7:49:38 16:34:38
Output: city TH H TM M TS S [100101] [000000] [01] [0110] [011] [0100] [011] [1000] New minute New hour
163
(在此以80 us當成1 sec測試SDIO card)
Testbench of SDIO Card (在此以80 us當成1 sec測試SDIO card)
164
in_data_rtc [01] [1001] [101] [1000] [011] [0000] 19 : 58 : 30
City0:001000 in_data_rtc [01] [1001] [101] [1000] [011] [0000] 19 : 58 : 30 in_data_alarm [01] [1001] [101] [1000] [100] [0000] 19 : 58 : 40 Reset Set alarm 19:58:31 19:58:30
165
Case 1: 001000 UTC-5 New York 000011 UTC-9:30 POM 19:58:32 15:28:32
Change Unchange 15:28:32 15:28:33 19:58:34 19:58:35
166
Case 2: 001000 UTC-5 New York 000000 UTC+8 Taiwan (dedault) 19:58:36 08:58:36
08:58:37 19:58:38 19:58:39 Change Unchange
167
in_data_alarm [01] [1001] [101] [1000] [100] [0000] 19 : 58 : 40
R_data_out [01] [1001] [101] [1000] [100] [0000] 19 : 58 : 40 → alarm pending show alarm alarm 19:58:40
168
Change city + show alarm time: UTC-5 New York UTC+8 Taiwan (dedault) 19:58:40 08:58:40 Change city Show alarm time 08:58:40
169
Cancel pending Rtc time : 19:58:43 show rtc time 19:58:43
170
在連接上 Host 或 Host reset SDIO card 之前
171
<sol> 加入內部軟體的reset模擬
172
在連接上host或host reset之前 RTC仍可以照常運作
00:00: :00: :00: :58: :58:31 reset
173
LCD
174
check RTC’s alarm_pending
initial print alarm Msg idle print city print alarm symbol alarm_pending = 1 check RTC’s data alarm_pending = 0 check RTC’s alarm_pending alarm_set = 0 show_t = 0 show_t = 1 alarm_set = 1 check RTC’s alarm set print real _time print alarm_time
175
show_t = 1 alarm_set = 0 alarm_pending = 1
CASE 1 show_t = 1 alarm_set = 0 alarm_pending = 1 initial print alarm Msg idle print city print alarm symbol check RTC’s data check RTC’s alarm_pending alarm_set = 0 show_t = 1 check RTC’s alarm set print real _time print alarm_time
176
start set position LCD initial alarm time print city
177
print city print alarm time
178
don’t care
179
end
180
show_t = 0 alarm_set = 0 alarm_pending = 1
CASE 2 show_t = 0 alarm_set = 0 alarm_pending = 1 initial print alarm Msg idle print city print alarm symbol check RTC’s data check RTC’s alarm_pending alarm_set = 0 show_t = 0 check RTC’s alarm set print real _time print alarm_time
181
alarm pend signal! Don’t care
still print city in LCD line 1
182
show_t = 0 alarm_set = 1 alarm_pending = 1
CASE 3 show_t = 0 alarm_set = 1 alarm_pending = 1 initial print alarm Msg idle print city print alarm symbol alarm_pending = 1 check RTC’s data check RTC’s alarm_pending show_t = 0 alarm_set = 1 check RTC’s alarm set print real _time print alarm_time
183
start print alarm Msg
184
end print city print alarm Msg
185
show_t = 1 alarm_set = 1 alarm_pending = 1
CASE 4 show_t = 1 alarm_set = 1 alarm_pending = 1 initial print alarm Msg idle print city print alarm symbol alarm_pending = 1 check RTC’s data check RTC’s alarm_pending show_t = 1 alarm_set = 1 check RTC’s alarm set print real _time print alarm_time
186
start alarm end print Alarm Msg alarm image LCD initialize alarm time
187
TESTBENCH All Project
188
Function List 起始時間(ms) 功能 內容 wait Wait for starting! 4.2 初始化
wait Wait for starting! 4.2 初始化 CMD0→CMD8 →CMD5 →CMD5 13.16 設定時間 CMD52(TH=1) → CMD52(H=9) → CMD52(TM=5) → CMD52(M=8) → CMD52(TS=3) → CMD52(S=0) → CMD52(reset_rtc=1) 26.6 設定鬧鐘 CMD52(TH=1) → CMD52(H=9) → CMD52(TM=5) → CMD52(M=8) → CMD52(TS=3) → CMD52(S=2) → CMD52(set_alarm=1) 40.04 顯示鬧鐘 CMD52(show_sel=1) 41.96 等待鬧鐘響 Waiting! 顯示時鐘 CMD52(show_sel=0) 關掉鬧鐘 CMD52(cancel_pending=1) 2046.6 切換時區 CMD52(city=Paris) → CMD52(change_city=1)
189
TESTBENCH RESET_RTC
190
CMD52(TH=1) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
191
CMD52(TH=1)
192
R5(CMD52) Bit position [15:8] [7:0] Description Modified R1
(in ready state) R/W Data ( data been read )
193
CMD52(H=9) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
194
CMD52(H=9)
195
CMD52(TM=5) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
196
CMD52(TM=5)
197
CMD52(M=8) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
198
CMD52(M=8)
199
CMD52(TS=3) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
200
CMD52(TS=3)
201
CMD52(S=0) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
202
CMD52 (reset_rtc=1) Bit position 47 46 [45:40] 39 [38:36] 35 34
[33:17] 16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
203
CMD52 (reset_rtc=1)
204
TESTBENCH 設定鬧鐘
205
CMD52(TH=1) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
206
CMD52(TH=1)
207
CMD52(H=9) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
208
CMD52(H=9)
209
CMD52(TM=5) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
210
CMD52(TM=5)
211
CMD52(M=8) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
212
CMD52(M=8)
213
CMD52(TS=3) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
214
CMD52(TS=3)
215
CMD52(S=2) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16
[15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
216
CMD52(S=2)
217
CMD52 (set_alarm=1) Bit position 47 46 [45:40] 39 [38:36] 35 34
[33:17] 16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
218
CMD52 (set_alarm=1) Set Alarm
219
TESTBENCH 顯示鬧鐘
220
CMD52 (show_sel=1) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17]
16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
221
CMD52 (show_sel=1) Show Alarm
222
TESTBENCH 顯示時鐘
223
CMD52 (show_sel=0) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17]
16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
224
CMD52 (show_sel=0) Show Clock
225
TESTBENCH 關掉鬧鐘
226
ringing Match!
227
CMD52(cancel_pending=1)
Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
228
CMD52(cancel_pending=1)
Stop alarm Stop ringing
229
TESTBENCH CHANGE_CITY
230
CMD52 (city=Paris) Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17]
16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
231
CMD52 (city=Paris)
232
CMD52 (change_city=1) Bit position 47 46 [45:40] 39 [38:36] 35 34
[33:17] 16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
233
CMD52 (change_city=1)
234
TESTBENCH 關掉鬧鐘
235
CMD52(cancel_pending=0)
Bit position 47 46 [45:40] 39 [38:36] 35 34 [33:17] 16 [15:8] [7:1] Description Start bit Direction Command index R/W Flag Function number RAW flag Stuff Register address Write data or stuff bits CRC7 End bit
236
CMD52(cancel_pending=0)
237
Project Finish LCD Time Display Command Response 1. Initialization
2. Data Transfer (Support 4 I/O Function) - 設定時間 - 設定鬧鐘 - 取消鬧鐘 - 切換時區 SDIO Card
238
Thank You!
Similar presentations
© 2018 SlidePlayer.com Inc.
All rights reserved.
Ppt on surface water pollution Ppt on pin diode attenuator Ppt on eddy current resistance Ppt on energy resources and conservation Ppt on professional development of teachers Ppt on electricity for class 10th physics Ppt on two point perspective pictures Ppt on sports day at school Ppt on msme in india Ppt on personality development and motivation