踩到stm32 usb的坑上了

2019-12-10 18:26发布

想用stm32f407的USB_HS
于是 ULPI接口外接PHY USB3343然后 cubemx配置好刷进去开机上电usb设备枚举不了。google各种搜搜到了下面这个贴
https://community.st.com/thread/20830

Hi

I have a problem with STM32F207/407 (not) working with a ULPI PHY, in this caseSMSC USB3340. The system (which is device-only) will work at USB full-speed but not high-speed. Itseems that others have similar problems - some ULPI-compliant PHYs seem to work,others not.

Logic analysis of the ULPI bus and USB line states show that during the USB_RESET period, the STM sets the PHY's Function Control register to generate the ChirpK indicating that the device can work at high-speed.  However, the ChirpK is never generated, so enumeration falls back to full-speed. Instead of sending the ChirpK, DP goes to 1.6V and DM to 0V.

It is possible that the problem arises because the USB Core sets theLPM bit (bit7) in the PHY's Function Control register. It looks at first sight as if PHYs which do notsupport LPM (and so ignore the bit) work correctly, and vice-versa.  For example on this forum we see a USB3343 not working and a USB3320 (similar but with no LPM support) working.

Does anyone at ST know if there is there a way to cause the STM32F deviceNOT to set the LPM bit in the ULPI PHY Function Control register? It would seem likely, but no such control is documented.

Does anyone have any further experience of which PHYs do and don't work in this regard?

Thanks
Ian

和我症状一模一样。用示波器观察了,连接usb电缆后Chirpk没有进入不了高速模式。

此贴后面向st官方fae证实是有些phy的LPM功能使能造成的。而且至今没有进入st的errdata。
可是你ST把ULPI访问开放出来也好啊。
结论就是我特么自己用了个phy踩到你们bug上了。
意大利人做事其实就是怎么不靠谱。
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。
该问题目前已经被作者或者管理员关闭, 无法添加新回复
23条回答
bbs2009
1楼-- · 2019-12-13 03:22
我用USB3320,STM32F7做从,F7连了个EMMC,能正常当U盘用。速度10多MB/S
lusson
2楼-- · 2019-12-13 05:30
lusson 发表于 2018-1-8 19:12
我用USB3320,STM32F7做从,F7连了个EMMC,能正常当U盘用。速度10多MB/S

能分享下F7+EMMC的参考程序吗?谢谢。
sblpp
3楼-- · 2019-12-13 09:45
 精彩回答 2  元偷偷看……
yick
4楼-- · 2019-12-13 13:33
不明觉厉。。。
full_newer
5楼-- · 2019-12-13 18:02
谢谢分享。。。

一周热门 更多>