cancel
Showing results for 
Search instead for 
Did you mean: 

USB host library MSC USBH_MSC_BOT_REQ_GetMaxLUN no response

JDong.14
Associate II

My current application(STM32f777NI) is using USB host library for USB flash stick.

I am using stm32cubef7         V1.12.0, now the appellation is stack after call "USBH_MSC_BOT_REQ_GetMaxLUN", and it appears that the usb stick is not response for this command.

I have some search in USB spec: https://www.usb.org/sites/default/files/usbmass-ufi10.pdf

here is the exact word:

3.2.2

Logical Unit Number

The Logical Unit Number field specifies the Logical Unit that shall process the command block.

Even though

SFF-8070i

states that the Logical Unit Number (LUN) at the block (packet) level will be made

obsolete in a future standard, block level LUNs are used by UFI command blocks because a control level LUN

does not exist. (The control level LUN is set in the ATAPI Block Device Select Register, which does not exist

on the UFI device.)

If the UFI device supports only one logical unit, its Logical Unit Number shall be zero. For other than the

INQUIRY command, if the UFI device detects a unsupported Logical Unit Number, the device shall abort the

command, setting the sense key shall be set to ILLEGAL REQUEST and the additional sense code to

LOGICAL UNIT NOT SUPPORTED

It looks like it is perfect valid for a device not response for the USBH_MSC_BOT_REQ_GetMaxLUN command, I have remove the like, and found usb stick with the FAT FS is working now.

Is this is a bug in the library or I have missed anything?

10 REPLIES 10
iw2lsi
Associate III

Hi...

increasing the heap (x2, now is 0x4000) did not help... it seems that:

if((status == USBH_NOT_SUPPORTED) || (status == USBH_BUSY))

is really making the difference in my case... I'll try to investigate it deeply...

Giampaolo