USB_MSD + Fat32 + SD card

⚠️
Hi there.. thanks for coming to the forums. Exciting news! we’re now in the process of moving to our new forum platform that will offer better functionality and is contained within the main Dialog website. All posts and accounts have been migrated. We’re now accepting traffic on the new forum only - please POST any new threads at//www.xmece.com/support. We’ll be fixing bugs / optimising the searching and tagging over the coming days.
3 posts / 0 new
Last post
Feodor Alexandrov
Offline
Last seen:3小时14分钟ago
加入:2020-07-02 13:36
USB_MSD + Fat32 + SD card

Hi Dialog,

I have a worknig SPI driver for the SDHC card with FATFS layer. I can read/write files on SD correctly and then see it on PC (if SD card injected separately). Now I want to connect SD card via MCU to PC and provide direct access to files on SD card via MSD interface. What is the minimal required actions order for configure USB MSD in this mode? May be exist some more detailed documentation or application example about how to insert the custom i/o layer to to MSD?

Notes.
1. I defined the state_cb_hook, where inserted the printing of logging info about usb states. When I start my MSD code, I see that USB walk through Attached, Ready, Addressed states and finish in Configured state. But my laptop on Ubuntu 20.04 does not see some injected devices.
2. I defined all USB_MSD_STORAGE_API functions. But as I could see only init and is_present routines has been called. Additionally init called only once, then is_medium_present called periodically.
No read/write functions was called.
3. I add driver by instruction like this in USBD_X_Config:
USBD_AddDriver(&USB_Driver_DialogSemi_DA1469x);
USBD_SetISRMgmFuncs(MSD_USB_ENABLE_ISR_FUNC, NULL, NULL);
4. Device info copied from SMSD example. And also LunInfo. Endpoints assigned in runtime correctly.
5. I tride to use USB_MSD_StorageByName as API but it compiles as undefined reference...
6. Also I tried to work with SMSD but it support Fat12 only, as I understand.

Thanks

Feodor

Device:
PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi Feodor Alexandrov,

Hi Feodor Alexandrov,

Thanks for your question. Let me check it internally with the Team and I will get back to you as soon as possible.

Regards, PM_Dialog

PM_Dialog
Offline
Last seen:3 days 4 hours ago
工作人员
加入:2018-02-08 11:03
Hi Feodor,

Hi Feodor,

We will reach out to you directly and offline from the forum.

Thanks, PM_Dialog