USB-mounted filesystem access problem when connecting a mouse or keyboard

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

USB-mounted filesystem access problem when connecting a mouse or keyboard

Jump to solution
390 Views
Littell
Contributor III

Greetings,

We’ve discovered that when we connect a USB keyboard or mouse we’re losing access to the USB-mounted filesystem. Here’s the basic topology of the hardware on our board:

RT1176 USB --> 4-port Renesas UPD720115 USB hub

Hub port 1 --> Microchip USB2244 USB 2.0 SD/MMC Flash Media Controller --> EMMC device (running at FS)

Hub port 2 --> unused

Hub port 3 --> USB-A connector

Hub port 4 --> USB-A connector


The system appears to be running just fine until a USB keyboard or mouse is plugged into a USB-A connector. After the keyboard or mouse is attached and enumerated we can no longer access the filesystem on the EMMC. It may be worth noting that this happens consistently (with some exceptions) when connecting the keyboard but has been noted only a couple of times when connecting a mouse. Also, if the board is powered up with the keyboard already plugged in the system generally appears to run just fine with no loss of filesystem access.

Additionally, testing was done on an earlier board where the Controller/EMMC isn’t present and instead a Flash drive is connected to one of the USB-A connectors. The loss-of-filesystem-access behavior was identical to the board with the Controller/EMMC hardware.

In trying to debug this I noticed that when stepping through the post-enumeration code the filesystem stayed up…but only if I stepped “slow enough”. Attempting to narrow down the focus it seems that the loss of filesystem access is related to retrieving the report descriptor from the keyboard. However, this may be a red herring as stepping the code with the debugger perturbs all sort of task- and driver-level timings, etc.

Connecting a Beagle 480 to one of the USB-A connectors showed that in the failure mode the USB is flooded with errored SETUP’s. I’m guessing this flooding is the cause of the loss of filesystem access.

Does anyone have any idea what might be causing the flood of SETUP's or what can be done to gather more information?


Thanks very much,
Dave

0 Kudos
Reply
1 Solution
326 Views
Sam_Gao
NXP Employee
NXP Employee

@Littell 

I assume that you use USB HUB and plug in the mouse or keyboard with below examples, it should be workable as the following. 

https://mcuxpresso.nxp.com/mcuxsdk/latest/html/examples/usb_examples/usb_host_hid_mouse_keyboard/rea... 

' use a USB HUB or an adapter with OTG functionality firstly. Plug in the mouse or keyboard device to the board. '

 

View solution in original post

0 Kudos
Reply
4 Replies
351 Views
Sam_Gao
NXP Employee
NXP Employee

Hi,

Can you give us a little bit details?such as SDK version, example, Hardware, how to reproduce this issue?

0 Kudos
Reply
333 Views
Littell
Contributor III
This is a FreeRTOS-based system with SDK 2.15.100 and MCUXpresso IDE v11.9.1. The hardware is described in my initial post. Reproducing the issue involves simply plugging in the keyboard and watching the Beagle recording.
0 Kudos
Reply
327 Views
Sam_Gao
NXP Employee
NXP Employee

@Littell 

I assume that you use USB HUB and plug in the mouse or keyboard with below examples, it should be workable as the following. 

https://mcuxpresso.nxp.com/mcuxsdk/latest/html/examples/usb_examples/usb_host_hid_mouse_keyboard/rea... 

' use a USB HUB or an adapter with OTG functionality firstly. Plug in the mouse or keyboard device to the board. '

 

0 Kudos
Reply
303 Views
Littell
Contributor III
Hi Sam,
Yes, the USB hub is the 4-port Renesas UPD720115 chip. Out code was based on the SDK example but it's probably a good idea to compare in detail what we have to the SDK example. Thanks for the suggestion.
0 Kudos
Reply