sd-card

Read CID of SDcard connected to USB-SD Reader under Linux

怎甘沉沦 提交于 2021-02-10 15:20:48
问题 I can read CID info easily when the card is connected to SDIO interface: stulluk@debian:~$ cat /sys/bus/mmc/devices/mmc0\:0007/cid 0150414a4836344713da8544b3012300 stulluk@debian:~$ But when I connect same card to USB-SDCard reader, I couldn't find any interface to read it in sysfs. Is there such interface in Linux? Or, is there any other way to read from registers of SDcard over USB in Userspace, without modifying Linux Kernel ? Many thanks. 回答1: But when I connect same card to USB-SDCard

Cannot move an app to the SD card

五迷三道 提交于 2021-02-07 14:23:30
问题 I am not able to move my own application to the SD card. My corresponding parts of manifest are as below (I am pasting also what permissions it needs). <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <application android:installLocation="preferExternal" android:label="@string/app_name" > <uses-sdk android:minSdkVersion="6" android:targetSdkVersion="9" /> I believe I followed guidelines described here:

f_mount() returns FA_DISK_ERR

末鹿安然 提交于 2020-07-10 10:19:46
问题 I have made few changes in my source code after suggestion form everyone.For connecting FATFS API with SPI interface i have followed this code.. https://github.com/eziya/STM32_SPI_SDCARD/blob/master/Src/fatfs_sd.c and changed my user_diskio.c accordingly. After doing all those things then also my SD Card returns FA_DISK_ERROR . I have changed SD Card slot as well as SD Card. But nothing Changed. My user_diskio.c look like this: #include <string.h> #include "ff_gen_drv.h" #include "fatfs_sd.h"

FATFS can't initialize the SD card

你说的曾经没有我的故事 提交于 2020-06-03 17:25:22
问题 So I'm using an STM32F407 and trying to write to an SD card with FATFS. I have used the CubeMX to generate the code for both the FAT layer and 4bit SDIO configuration software. I have added the following code to main to test whether the code works. UINT bw; f_mount(&FatFs, "", 0); /* Give a work area to the default drive */ /* Create a file */ if(f_open(&Fil, "newfile.txt", FA_WRITE | FA_CREATE_ALWAYS) == FR_OK) { f_write(&Fil, "It works!\r\n", 11, &bw); /* Write data to the file */ f_close(