Question
usbd_storage.c (MSC class) supports multiple LUN?
Posted on December 16, 2015 at 03:10
Hi All,
Does anyone know if the STM32 USB device library MSC class support more than 1 LUN? I can get 1 LUN to work fine using either external flash or a uSD card. But when I tried to set STORAGE_LUN_NBR to 2 and handle the different LUN appropriately in each call-back functions (defined in usbd_storage.c), the PC would detect 2 external drives but the 2nd drive did not work properly (meaning Windows showed the drive but no size information and couldn't access it). When I swap the code back to 1 LUN, either using external flash memory or uSD, everything works fine again. With that said, I'm not concern about the uSD or external flash memory driver, but it's probably the STM32 USB device library that might not properly support more than 1 LUN. Please let me know if you know anything about this issue. Thanks in advance!