1
完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
扫一扫,分享给好友
现在固件正在工作,我将重点放在应用程序端。我适应USB的应用程序是用C编写的(最初是为Windows 2编写的,最近才移植到32位Windows和VC 2005)。
该系统目前运行在一个PC卡和一个菊花链电缆运行在多个外部机箱(高达5)。使用USB,每个机箱中都会有一个USB卡,并且要知道哪张卡是哪一个。在初始化时,Irun扫描以检测每个机箱中的硬件,然后将其存储在存储器中与USB设备具有哪个硬件的交叉引用的数组中。 我看cyapiand的cydesc样本文件。我看得到描述符和一个ccyu***config对象是相当简单的,但看起来他们不告诉我关于一个给定的实例的任何独特的装置。我唯一看到的是独特的,是用open()指数。将该指标即使用户插入或删除一个设备使用cyu***.sys保持相同吗?我不关心用户插入或拔出卡操作时。如果他们那样做的任何理由,这会导致重新启动应用程序之后。 因为CyAPI看到所有设备的使用cyu***.sys可想而知,用户可以插入或拔出另一个设备使用相同的驱动程序在系统中运行,需要处理的可能性。如果变化的指标,那么,我们的系统会崩溃。 还有什么其他的每个实例可以使用跟踪设备的独特的? 比尔 以上来自于百度翻译 以下为原文 Now that the firmware is working, I'm focusing on the application side. The application I'm adapting to USB was written in C (originally written for Windows 2.0 and only recently ported to 32 bit Windows and VC 2005). The system currently runs with one ISA card in a PC and a daisy chain cable running between multiple external chassis (up to 5). With USB, there will be a USB card in each chassis and I need to keep track of which card is which. At initialization I run a scan to detect the hardware in each chassis and then that is stored in an array in memory that is cross referenced to which USB device has which hardware. I'm looking at the documentation for CyAPI and the cydesc sample. I see that getting the descriptor and a CCyUSBConfig object are fairly easy, but it looks like they don't tell me anything unique about a given instance of a device. The only thing I can see that is unique is the index used by Open(). Will this index stay the same even if the user plugs in or removes another device that uses CyUSB.sys? I'm not concerned with the user plugging or unplugging our cards while in operation. If they did that for any reason, it would be cause to restart the application afterwards. Since CyAPI sees all devices that use CyUSB.sys it is conceivable that the user might plug or unplug another device that uses the same driver while the system is in operation and I need to deal with that possibility. If that changes the indexes, then that will crash our system. Is there something else unique to each instance that I can use to keep track of the devices? Bill |
|
相关推荐
6个回答
|
|
那是不可能的。我的客户希望所有的卡都有相同的固件。这是进入一个生产测试系统,他们不想跟踪五个不同的零件号。我可以从这种方法看到至少十几种不同的头痛。
为什么不通过CyAPI公开集线器/端口信息?我知道信息在那里,因为如果你使用Stuudii例程,你可以得到它。我需要能够跟踪关于每个实例的某种独特信息。集线器/端口是我唯一知道的东西,如果你有两个相同的设备安装在同一个系统上,那是唯一的。也许还有别的事情,但这是我唯一知道的事情。 比尔 以上来自于百度翻译 以下为原文 That won't be possible. My customer wants all the cards to have the same firmware. This is going into a production test system and they don't want to track five different part numbers. I can see at least dozen different kind of headaches from that approach. Why don't you expose the hub/port information through CyAPI? I know the information is there because you can get it if you're using the SetupDi routines. I need to be able to track some kind of unique information about each instance. The hub/port is the only thing I know of that is unique if you have two identical devices installed on the same system. There may be something else, but that's the only thing I know of. Bill |
|
|
|
我在其他论坛上看到的另一个问题是:为什么CyPress不把源码发布到CysB.SIS驱动程序和CyAPI库?你从事制作IC的工作,这些是帮助人们与之交互的工具。你在这些产品上赚不到钱,你把源代码泄露给了其他所有东西。
如果我有CyAPI的源码,我可以在相当短的时间内将集线器/端口信息添加到库中。如果我能避免它,我宁愿不使用较低级别的API。它看起来像更多的编码来做同样的事情CyAPI对我来说。这是唯一的绊脚石。 比尔 以上来自于百度翻译 以下为原文 One other question I have seen asked on other forums: Why doesn't Cypress publish the source to the CyUSB.sys driver and CyAPI library? You're in the business of making the ICs and these are tools to help people interface with them. You don't make any money on these products and you give away the source code to everything else. If I had the source to CyAPI, I could add the hub/port information to the library myself in a fairly short time. I'd rather not use the lower level API if I can avoid it. It looks like a lot more coding to do the same things CyAPI does for me. This is the only stumbling block. Bill |
|
|
|
我成功地解决了一个非常相似的问题。虽然,我不得不承认,我的解决方案将需要一些额外的固件设计。我使用这个技术来匹配一个编号PCB到板特定校准参数从一个数据源(文件,DB,无论……)在软件中。
你的软件怎么编程?BooDoad还是将其全部编程到EEPROM上?我的方法是建立在前者的基础上的。 EZUSB设备至少需要一个EEPROM来存储VID/PID信息(“启动”EPROM,因为CY调用它)。还有足够的剩余空间来存储几个字节的序列号信息。因此,当VID/PID在制造/测试过程中被编程到EPROM时,PCB序列号被写入随后的字节中。 在固件中,我创建了一个特定于供应商的命令,从I2C接口重新读取此启动EEPROM,从流中解析出串行字节,并将这些字节作为EP0命令的数据有效载荷发送回。 这种方法效果很好。然而,如果你是一个“硬”firmeware ROM或EPROM编程你的供应商他们集体这种方法可能不是你的生产流程。毕竟,这并不意味着每个ROM是“自定义”…虽然这只是一个2字节的差异。 以上来自于百度翻译 以下为原文 I was able to sucesfully address a very similar issue. Although, I have to admit my solution will require some additional firmware design. I use this technique to match-up a numbered PCB to board-specific calibration parameters from a data source (file, DB, whatever...) in software. How are you programming your firware? Bootloading or is it all pre-programmed onto an EEPROM? My approach is based on the former... The EZUSB devices requires at least an EEPROM to store your VID/PID information ("boot" EPROM as CY calls it). There is enough additional space left over to store a few bytes of serial-number information. So, when the VID/PID is programmed to the EPROM during manufacturing/testing, the PCB serial number is written in the bytes that follow. In the firmware I created a vendor-specific command that re-reads this boot EEPROM form the i2c interface, parses out the serial # bytes from the stream and sends those back as the data payload for the EP0 command. This approach works well. However, if your firmeware is on a "hard" ROM or your EPROMS are vendor-programmed em-masse this approach may not work for your manufacturing process. After all, it does mean that each ROM is "custom"...even though it's only a 2 byte diff. |
|
|
|
我刚刚看到这个。硬件产量相当低。按每年10个单位的顺序(虽然过去几个月的销售方式,今年可能是今年的两倍)。固件正在下载,用于开发,但将被烧毁到一个EEPROM在现实世界中。
我的客户在卡边缘上放置一个旋转的六角开关,并把它连接到端口A的下半字节。我在固件init中读取并设置了16个设备描述符之一。这有点笨拙,但是很管用。 比尔 以上来自于百度翻译 以下为原文 I just saw this. The hardware is fairly low yield production. On the order of a dozen units a year (though the way sales have been the last few months, it could be twice that this year). The firmware is being downloaded for development, but will be burned into an EEPROM in the real world. My customer put a rotary hex switch on the card edge and wired it up to the lower nibble of Port A. I'm reading that at firmware init and setting one of 16 device descriptors. It's a little kludgy, but it works. Bill |
|
|
|
我的系统可以从1到13个USB设备,我关心的是用户是否可以关闭计算机并保证系统在相同的状态下返回。
我做了一些实验,并期待设备订单(设备γ-*是发送到Open-)的号码来跟踪USB端口,但是,不管我如何交换设备插入的USB端口位置,我总是有: 设备0跟踪序列号A 设备1跟踪序列号B 设备2跟踪序列号C 我把设备0的序列号从“A”改为“D”,然后顺序是: 设备0跟踪序列号B 设备1跟踪序列号C 设备2跟踪序列号D 客户将无法更改序列号。我可以确信设备订购会追踪序列号吗? 以上来自于百度翻译 以下为原文 My system can have from 1 to 13 USB devices and I'm concerned about whether the user can power down the computer and be assured that the system will come back in the same state. I did some experiments and expected the device order (Device # - # being the number sent to the Open() call) to track the USB ports, but instead, no matter how I swapped the USB port locations where the devices were plugged in, I always had: Device 0 tracked Serial Number A Device 1 tracked Serial Number B Device 2 tracked Serial Number C I changed the serial number of Device 0 from "A" to "D" and then the order was: Device 0 tracked Serial Number B Device 1 tracked Serial Number C Device 2 tracked Serial Number D Customer will not be able to change the serial number. Can I be assured that the device ordering will track serial number? |
|
|
|
USB规范对此没有任何说明。所以在所有OSES中你可能看不到这一点。
一件事,你可以做它填充DeVice句柄数组使用序列号删除这个依赖性和明确的任何假设,而不是依赖于OSES来做同样的方式。 当做, 阿南德 以上来自于百度翻译 以下为原文 USB spec does not say anything about this. So you may not see this in all OSes. One thing you can do it populate the devicehandle array using serial number to remove this dependency and be clear of any assumptions rather than relying on the OSes to do it the same way. Regards, Anand |
|
|
|
只有小组成员才能发言,加入小组>>
754个成员聚集在这个小组
加入小组2105 浏览 1 评论
1851 浏览 1 评论
3669 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1786 浏览 6 评论
1536 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
568浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
422浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
437浏览 2评论
383浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
915浏览 2评论
小黑屋| 手机版| Archiver| 德赢Vwin官网 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-23 02:54 , Processed in 1.019953 second(s), Total 89, Slave 71 queries .
Powered by 德赢Vwin官网 网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
德赢Vwin官网 观察
版权所有 © 湖南华秋数字科技有限公司
德赢Vwin官网 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号