LPC1837 - LPCOpen - MS_Host_SendCommand Stuck - Need Help

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC1837 - LPCOpen - MS_Host_SendCommand Stuck - Need Help

453件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by brunoalmeida on Sun Dec 07 12:04:31 MST 2014
Hello,


  I've been working with LCP1837 for the last 4 months and i've been facing one problem. Sniffing usb communications from OS (Linux, Mac and Windows) i've notice that they send some request with DataLength bigger than the response. The result is that the code get stuck waiting for the endpoint to be ok, and is impossible to answer this request.

One exemple of request is ModeSens6. The linux PC asks for an answer with 192 length (Wireshark Image).

Image - Wireshark

When sending the same request through LPC we simply get no answer back. But directly to the pendrive we receive a answer(Terminal Output Image)

Image - Terminal Output


The code is freezing on MS_Host_SendCommand::MS_Host_SendReceiveData when trying to receive data from pendrive.

Simple command request.

char buffer[192];
MS_CommandBlockWrapper_t wrapper;
wrapper.Signature = 0x43426355;
wrapper.Tag = 0x04;
wrapper.DataTransferLength = 192;
wrapper.Flags = 0x80;
wrapper.LUN = 0;
wrapper.SCSICommandData[0] = 0x1; wrapper.SCSICommandData[1] = 0xa;
wrapper.SCSICommandData[2] = 0x0; wrapper.SCSICommandData[3] = 0x0;
wrapper.SCSICommandData[4] = 0x3; wrapper.SCSICommandData[5] = 0xf;
wrapper.SCSICommandData[6] = 0x0; wrapper.SCSICommandData[7] = 0x0;
wrapper.SCSICommandData[8] = 0xc; wrapper.SCSICommandData[9] = 0x0;
wrapper.SCSICommandData[10] = 0x0; wrapper.SCSICommandData[11] = 0x0;
wrapper.SCSICommandData[12] = 0x0; wrapper.SCSICommandData[13] = 0x0;
wrapper.SCSICommandData[14] = 0x0; wrapper.SCSICommandData[15] = 0x0;
wrapper.SCSICommandLength = 192;

MS_Host_SendSimpleRequest(&Disk_MS_Interface_Host,wrapper, &buffer);
DEBUGOUT("%s ", buffer);

Steps.

1. Initiate one port as Host
2. Enumerate the device on it
3. SendSimpleRequest.
ラベル(1)
0 件の賞賛
1 返信

417件の閲覧回数
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by gfs_lpc on Wed Dec 10 15:24:34 MST 2014
I'm having the same problem but for another command, INQUIRY with requested data length 255. My board is a host and the device is in a FS bus.

Thanks in advance.
0 件の賞賛