完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我正在尝试一个非常基本的USB实现并运行。我打算只是做一些基本的供应商特定的转移,但目前我似乎不能让USB设备枚举超过几秒钟的分数。
我的主要循环非常简单: int main(空隙){int i;CyGalAcActuabess;UBSJESTART(0,UBSJDWRYVDDDX操作);i=0;而(!)UBJGETCONtiONTION()){Pt2ReGrimeWrrad(1 & lt;& lt;i);WaIT100();I++;IF(i=8){i=0;}}Pt2ReGueRead(0);/*…*/} 现在,UBJGETCONTIONTION()永远不会返回非零,所以我坐下旋转。计算机(OSX,还尝试在Windows和Linux)显示USB设备枚举然后消失,一遍又一遍的。如果我足够快,我可以看到我的制造商名称和产品名称字符串显示在lsu***输出如此而已。 我错过了一些基本的东西吗?我研究过的例子,他们似乎做同样的事情,事实上如果我加载另一个psoc5lp演示(如PSoC 4先锋程序员源)它做同样的事情,我相信有些事不在我的船上也许是正确的。 以上来自于百度翻译 以下为原文 I'm trying to get a very basic USB implementation up and running. I intend on just doing some basic vendor-specific transfers but at the moment I can't seem to get the USB device to enumerate for more than a few fractions of a second. My main loop is very straightforward: int main(void) { int i; CyGlobalIntEnable; USB_Start(0, USB_DWR_VDDD_OPERATION); i = 0; while (! USB_GetConfiguration()) { Port2Reg_Write(1 << i); wait100(); i++; if (i == 8) { i = 0; } } Port2Reg_Write(0); /* ... */ } Right now, USB_GetConfiguration() never returns nonzero so I sit and spin. The computer (OSX, also tried on Windows and Linux) shows the USB device enumerating and then disappearing, over and over again. If I am quick enough I can see that my manufacturer name and product name strings show up in lsu*** output but that's it. Is there something basic I'm missing? I have studied the examples and they seem to do the same thing, and in fact if I load one of the other PSoC5LP demos (such as the PSoC 4 Pioneer programmer source) it does the same thing, leading me to believe that something isn't correct perhaps on my board. |
|
相关推荐
13个回答
|
|
|
一些附加信息:
CY8C5868 AXI-LP035由USB供电,VDA/VDDD均为3.3V USB时钟为48 MHz,配置为2X ILO,其24MHz总线时钟为64 MHz,从PLL的源为ILO USB D+/D,通过22欧姆电阻连接,根据数据表无VUSB传感 以上来自于百度翻译 以下为原文 Some additional information:
|
|
|
|
|
|
您知道创建者起始页面上的示例项目链接吗?
“查找示例项目” 问候,Dana。 以上来自于百度翻译 以下为原文 You are aware of the example projects link on Creator Start page ? "Find Example Project" Regards, Dana. |
|
|
|
|
|
|
|
|
|
|
|
你忘记了无限循环。当你的“完成”完成后,PSoC重新启动。
鲍勃 以上来自于百度翻译 以下为原文 You forgot the infinite loop. When your "while" gets finished the PSoc reboots. Bob |
|
|
|
|
|
while(1){…被遗忘了(那是在片刻之后)!UBJGETCONTION()){…不存在的循环。
我已经看过例子项目,尝试了一些,他们做了同样的事情,这就是为什么我怀疑我忘记了从硬件方面的东西,但我不知道它是什么。USB D+/D -通过22欧姆电阻,PSoC5LP是从它自己的3.3V电源供电的VDDD和VDDA,其他PSoC功能工作精细(I/O,定时器等),但我似乎不能得到USB枚举和保持枚举。 以上来自于百度翻译 以下为原文 The while (1) { ... }; was left out (it was after the while (! USB_GetConfiguration()) { ... }; loop that never exits. I've looked at the example projects and tried a few, they do the same thing, which is why I'm suspecting that I'm forgetting something from the hardware side of things, but I'm at a loss as to what it is. USB D+/D- through 22 ohm resistors, PSoC5LP is powered from its own 3.3V supply on both VDDD and VDDA, other PSoC functions work fine (I/O, timers, etc.) but I can't seem to get USB to enumerate and stay enumerated. |
|
|
|
|
|
我有类似的情况。我必须重做5伏特的USB设置。似乎如此:UsBuTARTY1LSTART(0,UBUTARTURI 1Y5VII操作);
以上来自于百度翻译 以下为原文 I had something similar to your case. I had to remake the USB settings on 5 volts. Seems so: USBUART_1_Start (0, USBUART_1_5V_OPERATION); |
|
|
|
|
|
可能是ILO:它的精确度为-50%~+1,这在任何情况下对于USB连接都是正确的。
我建议您发布您的完整项目,以便我们可以查看所有设置。这样做,使用文件& gt;创建工作包(最小的),然后将.zip。不要使用Chrome,将无法正常工作,使用IE而效果最好。 鲍勃 以上来自于百度翻译 以下为原文 Probably the ILO: Its accuracy i-50% to +100% which in no case would be allright for an USB connection. I would suggest you to post your complete project so that we can have a look at all settings. To do so, use File -> Create Workspace Bundle (minimal) and then attach .zip. do NOT use chrome, will not work, use IE instead, works best. Bob |
|
|
|
|
|
正如你所说的,我使用ILO,但时钟似乎报告+/- 0%,这是惊人的惊人。我用较小的温度范围来帮助我猜这个项目。
按照要求,我正在附加工作区包。这很简单。提前感谢您抽出时间来帮助我。我真的很感激。 -A BLICKY.CYPRJ.CaseV01.ZIP 738 K 以上来自于百度翻译 以下为原文 I'm using the ILO as you mentioned, but the clock seems to report +/-0% which is frankly amazing. I'm using the smaller temp range for the project which may be helping I guess. As requested, I'm attaching the workspace bundle. It's pretty straightforward. Thank you in advance for taking the time to help. I do appreciate it. -A.
|
|
|
|
|
|
只是做一些阅读,并遇到了80248-提高内部振荡器的准确性和另一个应用注意,我现在找不到,建议修剪IMO使用USB 1ms开始帧(SOF)信号。
这可能是手动完成的吗?我现在正在安装一个捕捉计时器,现在要检查,但想把这个添加到讨论中,看看我是否偏离了基础。PSoC3和5LP文档都表明,它们与内部振荡器工作良好,但没有详细说明是否需要进行时钟修整。示例USB项目在使用外部24MHz晶体或配置24MHz的IMO之间变化,但到目前为止,我一直无法获得任何USB项目工作。 USB Bootloader为5LP工作提供了项目,但是任何使用USB并被配置为“BootloadLead”的项目在加载应用程序后都会做同样的事情(USB端上的无休止的连接/断开)。非常混乱。我曾尝试在调用UBSListSo()时明确地声明3V或5V操作,但两者都有相同的结果。 在这一点上,我确信硬件是好的,因为USB引导加载程序工作得很好,而且我刚刚在主应用程序中发现了一些不正确的配置(无论是Bootloador还是Stand)。 以上来自于百度翻译 以下为原文 Just doing some more reading and came across AN80248 - Improving the Accuracy of Internal Oscillators and another app note that I can't find now which suggested trimming the IMO using the USB 1ms start of frame (SOF) signal. Is it possible that this must be done manually? I'm in the midst of wiring up a capture timer now to check, but wanted to add this to the discussion to see if I'm off base. The PSoC3 and 5LP documentation both state that they work fine with the internal oscillator but none go into detail about whether clock trimming is required. the example USB projects vary between using an external 24MHz crystal or configuring the IMO for 24MHz but so far I've been unable to get any USB project to work. The USB Bootloader projects for the 5LP work, but any of the projects that use USB and are configured as "Bootloadable" all do the same thing (endless connect/disconnect on the USB side) once the application is loaded. Very confusing. I have tried explicitly stating 3V or 5V operation when calling USB_Start() but both have the same result. At this point I'm convinced that the hardware is fine since the USB Bootloader works fine, and that I've just got something incorrectly configured in the main application (whether Bootloadable or Standalone). |
|
|
|
|
|
PSOC5LP体系结构Trm的第144.2部分似乎说明USB时钟子系统已经包含了IMO校准以满足USB的+/- 0.25%精度要求。
以上来自于百度翻译 以下为原文 Section 14.4.2 of the PSoC5LP Architecture TRM seems to state that the USB clocking subsystem already contains the IMO calibration required to achive +/- 0.25% accuracy for USB... |
|
|
|
|
|
我无法在您的设置中发现任何奇怪的东西,除非您将CyPress的默认PID更改为其他东西。
我不是一个破解USB,但你不应该尝试保持默认,以便柏树驱动程序可以绑定? 鲍勃 以上来自于百度翻译 以下为原文 I could not find anything strange in your settings except that you changed Cypress's default PID to something else. I'm not a crack at USB, but shouldn't you try to keep the defaults so that the Cypress-driver could bind? Bob |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7088 浏览 0 评论
2474 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2073 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7566浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6114浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
742浏览 2评论
710浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
7962浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-2 04:18 , Processed in 1.151018 second(s), Total 96, Slave 78 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
434