踩到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条回答
sup888
1楼-- · 2019-12-12 15:33
YFM 发表于 2018-1-7 00:39
因为法国人和意大利人一起,苦逼的只有意大利人干事儿了。法国人喝咖啡去了 ...

这个就是典型的做多错多
sdram
2楼-- · 2019-12-12 18:46
nxp 带内置phy 的有推荐型号没
shangdawei
3楼-- · 2019-12-12 19:00
>> USB3320 (similar but with no LPM support) working

http://blog.csdn.net/K_O_Carnivist/article/details/50190099
高速USB 2.0的CMSIS-DAP调试器:CMSIS-DAP正确打开方式(3月18日更新速度和稳定性)

Capture_1170.jpg (196.15 KB, 下载次数: 0)

下载附件

2018-1-7 21:24 上传


STM32 与 USB3300 常规连接,公用一个 24MHz 晶振。

这里用的 USB3300 看起来也可以工作?
canopen
4楼-- · 2019-12-12 20:14
 精彩回答 2  元偷偷看……
YFM
5楼-- · 2019-12-12 21:36
shangdawei 发表于 2018-1-7 21:25
>> USB3320 (similar but with no LPM support) working

http://blog.csdn.net/K_O_Carnivist/article/det ...

PHY不带LPM功能的都可以正常工作
run
6楼-- · 2019-12-13 03:16
还是用usb3300吧

一周热门 更多>