Vault 7: Projects

This publication series is about specific projects related to the Vault 7 main publication.

sent to the card. If the card is not answering with 0x00, the card is either not present, not configured, or in an error state. If
this is the case, we try to reconfigure the card. If the configuration fails, we consider the card not present (it still may be
present, but malfunctioning). In order to use the software card detect mechanism, the MEDIA_SOFT_DETECT macro must
be defined.
Remarks
None
Preconditions
The FILEIO_SD_MediaDetect function pointer must be configured to point to this function in FSconfig.h
Parameters
Parameters Description
config The given drive configuration
Return Values
Return Values Description
true Card detected
false No card detected
Function
bool FILEIO_SD_MediaDetect ( FILEIO_SD_DRIVE_CONFIG * config)
1.7.2.1.4 FILEIO_SD_MediaInitialize Function
Initializes the SD card.
File
sd_spi.h
Syntax
FILEIO_MEDIA_INFORMATION * FILEIO_SD_MediaInitialize(FILEIO_SD_DRIVE_CONFIG * config);
Module
SD (SPI) Driver
Side Effects
None.
Description
This function will send initialization commands to and SD card.
Remarks
Psuedo code flow for the media initialization process is as follows:
-----------------------------------------------------------------------------------------
SD Card SPI Initialization Sequence (for physical layer v1.x or v2.0 device) is as follows:
-----------------------------------------------------------------------------------------
0. Power up tasks a. Initialize microcontroller SPI module to no more than 400kbps rate so as to support MMC devices. b.
Add delay for SD card power up, prior to sending it any commands. It wants the longer of: 1ms, the Vdd ramp time (time
from 2.7V to Vdd stable), and 74+ clock pulses.
1. Send CMD0 (GO_IDLE_STATE) with CS = 0. This puts the media in SPI mode and software resets the SD/MMC card.
2. Send CMD8 (SEND_IF_COND). This requests what voltage the card wants to run at.
1.7 Library Interface MLA - File I/O Library Help Physical Layer
72

e-Highlighter

Click to send permalink to address bar, or right-click to copy permalink.

Un-highlight all Un-highlight selectionu Highlight selectionh