A few years ago, I ran into a problem with a USB MCU-programmer board not being recognized when plugged into my laptop. Turns out it was a USB 1 device, and apparently the laptop's USB 2 port wouldn't talk to it directly, despite all the promises of backward compatibility. Plugging it in via a hub solved the problem.
Fast forward to this morning. I'm already frazzled, for various reasons, and desperately need a nap... but I also need to get ready to run off to a client site this afternoon for some urgent debugging, and it seems a good idea to have the ST MCU development tools all checked out on my laptop.
So I get everything installed (which was a pain in its own right), carry my copy of the target board, its power supply, and my ST/Link v2 plus spacial adapter out to the table, plug it all together, run st-util to see that all's well:
2015-08-14T11:15:38 INFO src/stlink-common.c: Loading device parameters....
2015-08-14T11:15:38 WARN src/stlink-common.c: unknown chip id! 0xe0042000
(Timestamps not correct, but that was the message.)
Um... oops? Chip ID 0xe0042000 is, if memory serves, what you get if there's no chip, no target power, or otherwise no response.
So, after much running around, and confirming that it still works on my workstation and on the low-end Linux box in the lab, and taking a lunch break, and deciding to have one last try, I tried again on the workstation, sans target power:
2015-08-14T11:15:38 INFO src/stlink-usb.c: -- exit_dfu_mode
2015-08-14T11:15:38 INFO src/stlink-common.c: Loading device parameters....
2015-08-14T11:15:38 WARN src/stlink-common.c: unknown chip id! 0xe0042000
(Those being the actual time stamps.)
Huh. That first line. I wasn't seeing it on the laptop.
Um?
At my desk, and at the workbench, the handy USB ports are on hubs plugged into the actual back-panel ports.
So I rummage around in the laptop bag for the little portable hub, plug the pod in through that, and hey presto! I get the exit_dfu_mode line. With power applied to the target, I even get a proper sign-on, with the chip recognized and everything.
So, if st-util is giving you unknown chip id 0xe0042000, and the pod is plugged directly into the computer... try adding a USB hub.
Yes, I do realize that this makes no sense. But, then, a lot of things in the USB world make no sense. Live with it.
Comments