From 707613c93eb0cc3b663c6ea12f4fee3ff95cfefb Mon Sep 17 00:00:00 2001 From: xmrhrx Date: Sat, 6 Jul 2024 21:47:33 +0800 Subject: [PATCH 1/2] add kernel xHCI dead troubleshooting --- .../1-general-troubleshooting/README.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/f3discovery/src/appendix/1-general-troubleshooting/README.md b/f3discovery/src/appendix/1-general-troubleshooting/README.md index 6e9a730aa..c73e09a95 100644 --- a/f3discovery/src/appendix/1-general-troubleshooting/README.md +++ b/f3discovery/src/appendix/1-general-troubleshooting/README.md @@ -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 From 38deec4ac4a53e446c6d948d1e2dd5cf2a2e309b Mon Sep 17 00:00:00 2001 From: xmrhrx Date: Sat, 6 Jul 2024 22:14:25 +0800 Subject: [PATCH 2/2] add kernel xHCI dead troubleshooting --- .../src/appendix/1-general-troubleshooting/README.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/f3discovery/src/appendix/1-general-troubleshooting/README.md b/f3discovery/src/appendix/1-general-troubleshooting/README.md index c73e09a95..79b1f1cd6 100644 --- a/f3discovery/src/appendix/1-general-troubleshooting/README.md +++ b/f3discovery/src/appendix/1-general-troubleshooting/README.md @@ -253,13 +253,3 @@ Linux: - 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