Skip to main content
Visitor II
November 24, 2019
Question

dual Micro SD in one Mass Storage Device

  • November 24, 2019
  • 4 replies
  • 893 views

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

    This topic has been closed for replies.

    4 replies

    Graduate II
    November 24, 2019

    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.

    MacLarenAuthor
    Visitor II
    November 24, 2019

    i am beginner in it can you Explain more

    thanks

    MacLarenAuthor
    Visitor II
    December 11, 2019

    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 */

    MacLarenAuthor
    Visitor II
    December 12, 2019

     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 ?!