踩到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条回答
wye11083
1楼-- · 2019-12-11 00:02
 精彩回答 2  元偷偷看……
dengxiaofeng
2楼-- · 2019-12-11 04:05
几年前 就已经被坑了,至今 看到 ST  Hs USB就怕,我记得当时 不少 USB寄存器 说明都没有,当时库也有问题,后来换方案了,污点呀,我自己选的方案,唯一一个没有搞定的东西。后来换 NXP 内置PHY 和 赛普拉斯都好好的。 当然  ST USB的全速是没问题的,HS也不是一次都不成功,貌似。
YFM
3楼-- · 2019-12-11 09:08
wye11083 发表于 2018-1-6 09:30
改驱动不行了。这是驱动的锅,不是硬件的锅。

stm32f4 usb_hs没有访问phy寄存器的描述。我估计他们是直接在硬件上面直接用状态机实现了。然后养出了bug。要改的话就要重新流片了。所以说stm32f4的usb_hs就是st的一个试验品
tim
4楼-- · 2019-12-11 14:20
“意大利人做事其实就是怎么不靠谱。”
-------------------------------------------------
ST是意大利的?
YFM
5楼-- · 2019-12-11 17:03
tim 发表于 2018-1-6 17:50
“意大利人做事其实就是怎么不靠谱。”
-------------------------------------------------
ST是意大利的 ...

嗯~ 很久以前是意大利公司和法国公司合做搞出来的
huangqi412
6楼-- · 2019-12-11 19:19
 精彩回答 2  元偷偷看……

一周热门 更多>