cancel
Showing results for 
Search instead for 
Did you mean: 

dual Micro SD in one Mass Storage Device

MacLaren
Associate III

hi

i need help to have dual Micro SD in one Mass Storage Device in H743 for see two micro sd in pc from one usb

project use two sdio 1 & 2 , devise fs and mass storage

it work correct for every micro sd separately but not work together

in code last init micro sd work

this page source for one sd, mass storage that i use

 https://microtechnics.ru/en/stm32-i-usb-mass-storage-sd-card/#comment-16577

4 REPLIES 4

Typically you'd have the MSC report multiple LUN, each would report unique INQUIRY and CAPACITY information, and the you'd have two unique SDMMC instances dispatched based on decoded LUN from the SCSI packets.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
MacLaren
Associate III

i am beginner in it can you Explain more

thanks

MacLaren
Associate III

i change Lun and now i see 2 drive of Mass Storage but all drive present just one sd card

  MX_GPIO_Init();
  MX_SDMMC1_SD_Init();
  MX_SDMMC2_SD_Init();
 // MX_FATFS_Init();
  if((FATFS_LinkDriver(&SD_Driver, RAMpath) == 0) && (FATFS_LinkDriver(&SD2_Driver, SDpath) == 0))
  {
  MX_USB_DEVICE_Init();//for sdio1
  HAL_SD_Init(&hsd1);//for sdio1
 //MX_USB2_DEVICE_Init();//for sdio2
  HAL_SD_Init(&hsd2);// for sdio2
  /* USER CODE BEGIN 2 */

MacLaren
Associate III

 in this code hsd1 (micro sd 1) appear in two drive if i change init hsd2 with hsd1, micro sd 2 appear in two drive

any one have idea ?!