/Zephyr-latest/subsys/sd/ |
D | sdmmc.c | 63 static int sdmmc_app_command(struct sd_card *card, int relative_card_address) in sdmmc_app_command() argument 65 return card_app_command(card, relative_card_address); in sdmmc_app_command() 68 /* Reads OCR from SPI mode card using CMD58 */ 69 static int sdmmc_spi_send_ocr(struct sd_card *card, uint32_t arg) in sdmmc_spi_send_ocr() argument 80 ret = sdhc_request(card->sdhc, &cmd, NULL); in sdmmc_spi_send_ocr() 87 card->ocr = cmd.response[1]; in sdmmc_spi_send_ocr() 88 if (card->ocr == 0) { in sdmmc_spi_send_ocr() 96 /* Sends OCR to card using ACMD41 */ 97 static int sdmmc_send_ocr(struct sd_card *card, int ocr) in sdmmc_send_ocr() argument 111 ret = sdmmc_app_command(card, 0U); in sdmmc_send_ocr() [all …]
|
D | sd.c | 22 static inline int sd_idle(struct sd_card *card) in sd_idle() argument 26 /* Reset card with CMD0 */ in sd_idle() 32 return sdhc_request(card->sdhc, &cmd, NULL); in sd_idle() 41 static int sd_send_interface_condition(struct sd_card *card) in sd_send_interface_condition() argument 47 /* Reset card with CMD0 */ in sd_send_interface_condition() 48 ret = sd_idle(card); in sd_send_interface_condition() 50 LOG_ERR("Card error on CMD0"); in sd_send_interface_condition() 60 ret = sdhc_request(card->sdhc, &cmd, NULL); in sd_send_interface_condition() 66 if (card->host_props.is_spi) { in sd_send_interface_condition() 72 LOG_DBG("Legacy card detected, no CMD8 support"); in sd_send_interface_condition() [all …]
|
D | sdio.c | 28 static int sdio_send_ocr(struct sd_card *card, uint32_t ocr) in sdio_send_ocr() argument 38 /* Send OCR5 to initialize card */ in sdio_send_ocr() 40 ret = sdhc_request(card->sdhc, &cmd, NULL); in sdio_send_ocr() 43 /* Just probing card, likely not SDIO */ in sdio_send_ocr() 49 /* We are probing card, check number of IO functions */ in sdio_send_ocr() 50 card->num_io = (cmd.response[0] & SDIO_OCR_IO_NUMBER) in sdio_send_ocr() 52 if ((card->num_io == 0) || in sdio_send_ocr() 55 /* Card is not an SDIO card */ in sdio_send_ocr() 58 /* Card is not a supported SD device */ in sdio_send_ocr() 61 /* Card has IO present, return zero to in sdio_send_ocr() [all …]
|
D | sd_ops.c | 19 /* Read card status. Return 0 if card is inactive */ 20 int sdmmc_read_status(struct sd_card *card) in sdmmc_read_status() argument 27 if (!card->host_props.is_spi) { in sdmmc_read_status() 28 cmd.arg = (card->relative_addr << 16U); in sdmmc_read_status() 34 ret = sdhc_request(card->sdhc, &cmd, NULL); in sdmmc_read_status() 38 if (card->host_props.is_spi) { in sdmmc_read_status() 55 /* Otherwise, check native card response */ in sdmmc_read_status() 60 /* Valid response, the card is busy */ in sdmmc_read_status() 64 /* Waits for SD card to be ready for data. Returns 0 if card is ready */ 65 int sdmmc_wait_ready(struct sd_card *card) in sdmmc_wait_ready() argument [all …]
|
D | sd_ops.h | 12 * Switches voltage of SD card to 1.8V, as described by 15 int sdmmc_switch_voltage(struct sd_card *card); 18 * Reads card identification register, and decodes it 20 int card_read_cid(struct sd_card *card); 23 * Read card specific data register 25 int sdmmc_read_csd(struct sd_card *card); 28 * Requests card to publish a new relative card address, and move from 31 int sdmmc_request_rca(struct sd_card *card); 34 * Selects card, moving it into data transfer mode 36 int sdmmc_select_card(struct sd_card *card); [all …]
|
D | mmc.c | 45 #define MMC_REL_ADR_ARG (card->relative_addr << 16U) 55 inline int mmc_write_blocks(struct sd_card *card, const uint8_t *wbuf, uint32_t start_block, in mmc_write_blocks() argument 58 return card_write_blocks(card, wbuf, start_block, num_blocks); in mmc_write_blocks() 61 inline int mmc_read_blocks(struct sd_card *card, uint8_t *rbuf, uint32_t start_block, in mmc_read_blocks() argument 64 return card_read_blocks(card, rbuf, start_block, num_blocks); in mmc_read_blocks() 67 inline int mmc_ioctl(struct sd_card *card, uint8_t cmd, void *buf) in mmc_ioctl() argument 69 return card_ioctl(card, cmd, buf); in mmc_ioctl() 73 static int mmc_send_op_cond(struct sd_card *card, int ocr); 76 static int mmc_set_rca(struct sd_card *card); 79 static int mmc_read_csd(struct sd_card *card, struct sd_csd *card_csd); [all …]
|
D | Kconfig | 29 Enable SD card support. 38 int "Timeout while initializing SD card" 41 Maximum time to wait, in milliseconds, for the SD card to initialize. 80 Size in bytes of internal buffer SD card uses for unaligned reads and 84 int "Number of times to retry sending command to card" 87 Number of times to retry sending command to SD card in case of failure 90 int "Number of times to retry sending data to card" 93 Number of times to retry sending data to SD card in case of failure 97 bool "Ultra high speed SD card protocol support" 104 hex "MMC Relative card address" [all …]
|
D | sd_init.h | 14 int sdio_card_init(struct sd_card *card); 16 int sdmmc_card_init(struct sd_card *card); 18 int mmc_card_init(struct sd_card *card);
|
/Zephyr-latest/tests/subsys/sd/sdio/src/ |
D | main.c | 14 static struct sd_card card; variable 17 * Verify that SD stack can initialize an SDIO card. 18 * This test must run first, to ensure the card is initialized. 27 zassert_equal(ret, 1, "SD card not present in slot"); in ZTEST() 29 ret = sd_init(sdhc_dev, &card); in ZTEST() 30 zassert_equal(ret, 0, "Card initialization failed"); in ZTEST() 35 * we just read from the card common I/O area. 42 /* Read from card common I/O area. */ in ZTEST() 43 ret = sdio_read_byte(&card.func0, SDIO_CCCR_CCCR, ®); in ZTEST() 44 zassert_equal(ret, 0, "SD card read failed"); in ZTEST() [all …]
|
/Zephyr-latest/tests/subsys/sd/sdmmc/src/ |
D | main.c | 18 static struct sd_card card; variable 28 * Verify that SD stack can initialize an SD card 29 * This test must run first, to ensure the card is initialized. 38 zassert_equal(ret, 1, "SD card not present in slot"); in ZTEST() 40 ret = sd_init(sdhc_dev, &card); in ZTEST() 41 zassert_equal(ret, 0, "Card initialization failed"); in ZTEST() 49 ret = sdmmc_ioctl(&card, DISK_IOCTL_GET_SECTOR_COUNT, §or_count); in ZTEST() 51 TC_PRINT("SD card reports sector count of %d\n", sector_count); in ZTEST() 53 ret = sdmmc_ioctl(&card, DISK_IOCTL_GET_SECTOR_SIZE, §or_size); in ZTEST() 55 TC_PRINT("SD card reports sector size of %d\n", sector_size); in ZTEST() [all …]
|
/Zephyr-latest/tests/subsys/sd/mmc/src/ |
D | main.c | 17 static struct sd_card card; variable 26 * Verify that SD stack can initialize an MMC card 27 * This test must run first, to ensure the card is initialized. 35 ret = sd_init(sdhc_dev, &card); in ZTEST() 37 zassert_equal(ret, 0, "Card initialization failed"); in ZTEST() 45 ret = mmc_ioctl(&card, DISK_IOCTL_GET_SECTOR_COUNT, §or_count); in ZTEST() 47 TC_PRINT("SD card reports sector count of %d\n", sector_count); in ZTEST() 49 ret = mmc_ioctl(&card, DISK_IOCTL_GET_SECTOR_SIZE, §or_size); in ZTEST() 51 TC_PRINT("SD card reports sector size of %d\n", sector_size); in ZTEST() 54 /* Verify that SD stack can read from an SD card */ [all …]
|
/Zephyr-latest/include/zephyr/sd/ |
D | sd.h | 24 * @brief card status. Used internally by subsystem. 27 CARD_UNINITIALIZED = 0, /*!< card has not been initialized */ 28 CARD_ERROR = 1, /*!< card state is error */ 29 CARD_INITIALIZED = 2, /*!< card is in valid state */ 33 * @brief card type. Used internally by subsystem. 36 CARD_SDMMC = 0, /*!< SD memory card */ 37 CARD_SDIO = 1, /*!< SD I/O card */ 38 CARD_COMBO = 2, /*!< SD memory and I/O card */ 39 CARD_MMC = 3, /*!< MMC memory card */ 50 struct sd_card *card; /*!< Card this function is present on */ member [all …]
|
D | mmc.h | 9 * @brief Public API for MMC memory card subsystem 24 * @brief Write blocks to MMC card from buffer 26 * Writes blocks from MMC buffer to MMC card. For best performance, this buffer 28 * @param card MMC card to write from 33 * @retval -EBUSY: card is busy with another request 34 * @retval -ETIMEDOUT: card write timed out 37 int mmc_write_blocks(struct sd_card *card, const uint8_t *wbuf, 41 * @brief Read block from MMC card to buffer 43 * Reads blocks into MMC buffer from MMC card. For best performance, this buffer 45 * @param card MMC card to read from [all …]
|
D | sdmmc.h | 9 * @brief Public API for SD memory card subsystem 24 * @brief Write blocks to SD card from buffer 26 * Writes blocks from SD buffer to SD card. For best performance, this buffer 28 * @param card SD card to write from 33 * @retval -EBUSY: card is busy with another request 34 * @retval -ETIMEDOUT: card write timed out 37 int sdmmc_write_blocks(struct sd_card *card, const uint8_t *wbuf, 41 * @brief Read block from SD card to buffer 43 * Reads blocks into SD buffer from SD card. For best performance, this buffer 45 * @param card SD card to read from [all …]
|
D | sdio.h | 26 * Initializes SDIO card function. The card function will not be enabled, 28 * and write data from the card. 30 * @param card: SD card to enable function on 35 int sdio_init_func(struct sd_card *card, struct sdio_func *func, 41 * Enables SDIO card function. @ref sdio_init_func must be called to 42 * initialized the function structure before enabling it in the card. 45 * @retval -ETIMEDOUT: card I/O timed out 71 * @retval -EBUSY: card is busy with another request 72 * @retval -ETIMEDOUT: card read timed out 85 * @retval -EBUSY: card is busy with another request [all …]
|
D | sd_spec.h | 8 * SD card specification 69 * to inform the SD card the next command is an application-specific one. 169 * to check status of SD card. 239 * flags used by SD subsystem to determine support for SD card features. 258 * supported functions of SD card. 263 /** Card capacity status */ 265 /** Card capacity status */ 295 * supported functions of MMC card. 313 * supported functions of SDIO card. 390 * these bit flags are provided as a response to CMD6 by the card [all …]
|
/Zephyr-latest/tests/subsys/sd/sdio/ |
D | README.txt | 5 devices. Note that this test will only perform basic reads from the SDIO card 6 after initialization, as most registers present on the card will be vendor 7 specific. It requires an SDIO card be connected to the board to pass. 10 * Init test: verify the SD host controller can detect card presence, and 12 can correctly initialize an SDIO card. 14 * Read test: verify that a read from the SDIO common card register area returns 18 for this card after initialization.
|
/Zephyr-latest/dts/bindings/sdhc/ |
D | nxp,imx-usdhc.yaml | 45 This pin defaults to active high when consumed by the SD card. The 53 This pin defaults to active low when produced by the SD card. The 60 When the external SD card circuit does not support 1.8V, add this 61 property to disable 1.8v card voltage of SD card controller. 66 Enable the host to detect an SD card via the DAT3 line of the SD card 73 Use the host's internal card detect signal (USDHC_CD) to detect the SD 74 card. This signal is available as an alternative to card detect via GPIO,
|
D | zephyr,sdhc-spi-slot.yaml | 12 Time in ms for SPI SDHC to delay when toggling power to the SD card. This 13 delay gives the card time to power up or down fully. It can be increased 14 if you observe issues initializing your card. 35 It can be used to toggle card power via an external control circuit
|
/Zephyr-latest/tests/subsys/sd/mmc/ |
D | README.txt | 8 use. It requires an SD card be connected to the board to pass, and will 9 perform destructive I/O on the card, wiping any data present. The test has 12 * Init test: verify the SD host controller can detect card presence, and 14 can correctly initialize an SD card. 21 the card's stated size. 25 the card's stated size. 27 * R/W test: write data to the MMC card, and verify that it is able 29 sector locations across the MMC card.
|
/Zephyr-latest/tests/subsys/sd/sdmmc/ |
D | README.txt | 8 use. It requires an SD card be connected to the board to pass, and will 9 perform destructive I/O on the card, wiping any data present. The test has 12 * Init test: verify the SD host controller can detect card presence, and 14 can correctly initialize an SD card. 21 the card's stated size. 25 the card's stated size. 27 * R/W test: write data to the SD card, and verify that it is able 29 sector locations across the SD card.
|
/Zephyr-latest/doc/_extensions/zephyr/domain/static/css/ |
D | board-catalog.css | 94 .board-card { 108 .board-card:hover, 109 .board-card:focus { 115 .board-card .picture { 128 .board-card .no-picture { 134 .board-card .vendor { 142 .board-card img { 148 .board-card .board-name { 158 .board-card .arch { 167 .board-card { [all …]
|
/Zephyr-latest/tests/drivers/sdhc/src/ |
D | main.c | 20 /* Prepare IO settings for card */ 115 * Verify that the driver can detect a present SD card 125 /* Card not in slot, test card insertion interrupt */ in ZTEST() 126 TC_PRINT("Waiting for card to be present in slot\n"); in ZTEST() 129 zassert_equal(ret, 0, "Could not install card insertion interrupt"); in ZTEST() 130 /* Wait for card insertion */ in ZTEST() 132 /* Delay now that card is in slot */ in ZTEST() 134 zassert_equal(ret, 0, "Card insertion interrupt did not fire"); in ZTEST() 137 zassert_equal(ret, 1, "Card is not reported as present, is one connected?"); in ZTEST() 140 /* Verify that the driver can send commands to SD card, by reading interface [all …]
|
/Zephyr-latest/tests/drivers/sdhc/ |
D | README.txt | 5 SD host controller API. It requires that an SD card be present on the SD bus 19 * Card presence test. Verify that the SDHC detects card presence. 21 * Request test: Make a request to read the card interface condition, 24 Note that this test does not verify the tuning or card busy api, as the SD
|
/Zephyr-latest/samples/subsys/fs/fs_sample/ |
D | README.rst | 11 system driver with SDHC card, SoC flash or external flash chip. 15 Requirements for SD card support 18 This project requires SD card support and microSD card formatted with proper file system 20 Boards that by default use SD card for storage: ``arduino_mkrzero``, ``esp_wrover_kit``, 65 In case when board with SD card is used FAT microSD card should be present in the 66 microSD slot. If there are any files or directories present in the card, the 87 A microSD card must be present in a microSD card slot of the board, for the sample to execute.
|