GS2101M IP2WiFi Adapter Command Reference Guide
1VV0301499
Rev. 2.0
54
2019-08-05
3.2.3.2 SDIO Host Slave Initialization and Communication
This section provides initialization steps to be performed by the Host (SDIO Master) after
power up.
NOTE:
Before the Host powers up, GS node needs to be interfaced with Host via SDIO.
3.2.3.2.4 Host-SDIO Master Initialization
The following steps are performed to initialize Host-SDIO Master:
1. Initialization
–
Set the SDIO clock to 400KHz
–
Set the bus width to 1
–
Set power state to ON
–
Enable SDIO clock
–
Enable card insert/remove interrupt
2. Wait for the card insert interrupt.
NOTE:
Card insert interrupt happens only on a fresh insert. If present during boot, the
Host shall not wait for this interrupt.
3. Once step 2 occurs, perform the following: (Refer function io_sd_mount ())
–
Set the clock frequency (low speed-400KHz) for card identification
–
Wait for card wake up (100 msec/500msec/1sec)
–
Send CMD52 to do a card reset (CMD52, fun0, address 0x06, value -> 0x08,
write)
–
Send CMD5 and check for the error status
–
If the above CMD returns no error, check number of IO functions
–
Set the supported function number
–
Send CMD5 with argument 0 to get OCR (Operations Condition Register), which
is used to inquire about the voltage range needed by the I/O card (GS node).
–
Send CMD5 to write new voltage and keep sending it (this can be performed in a
loop for a maximum of 100 iterations) till it returns success
–
Check the response and wait for the card ready.
–
Send CMD3 with argument 0 to get RCA (Relative Card Address Register)
–
Send CMD7 to change the state
–
Read CCR register 0x13 to get the capability
–
Depends on the capability enable high/low speed by setting corresponding clock.