Skip to content

Commit

Permalink
add kernel xHCI dead troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
XMRHRX committed Jul 6, 2024
1 parent 7100443 commit 707613c
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions f3discovery/src/appendix/1-general-troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,3 +216,50 @@ $ rustup update nightly

$ rustup target add thumbv7em-none-eabihf
```

## Kernel problems

### lsusb don't show STM32F after STM32F got stuck, even reconnect

#### Symptoms

Sometime you might make STM32 freeze, and it lost connect even if you reconnect the USB

and got something like these in `dmesg`:

```
[ 700.256746] xhci_hcd 0000:06:00.4: xHCI host not responding to stop endpoint command
[ 700.260711] xhci_hcd 0000:06:00.4: xHCI host controller not responding, assume dead
[ 700.260711] xhci_hcd 0000:06:00.4: HC died; cleaning up
```

#### Cause

STM32 got freezed, kernel can not get the response from it, so remove it.
Reconnect USB port won't make kernet to try connect it again.

#### Fix

Linux:

- Get the ID from `dmesg`, the id is "0000:06:00.4" for below example:

```
[ 700.256746] xhci_hcd 0000:06:00.4: xHCI host not responding to stop endpoint command
[ 700.260711] xhci_hcd 0000:06:00.4: xHCI host controller not responding, assume dead
[ 700.260711] xhci_hcd 0000:06:00.4: HC died; cleaning up
```

- go to `/sys/bus/pci/drivers/xhci_hcd/`
- unbind it with ID, `echo -n "0000:06:00.4" > unbind`
- rebind it, `echo -n "0000:06:00.4" > bind`


[these instructions]: ../../03-setup/linux.md#udev-rules

Windows:

- You are probably missing the ST-LINK USB driver. Installation instructions
[here].

[here]: ../../03-setup/windows.md#st-link-usb-driver

0 comments on commit 707613c

Please sign in to comment.