搜索
bottom↓
回复: 15

CYPRESS没有解答马老师的问题,可否放上来一起研究一下?(usbuart的fix,但还是不完善)【

[复制链接]

出0入0汤圆

发表于 2008-11-3 10:46:16 | 显示全部楼层 |阅读模式
"实际上,我碰到的问题还有许多,有一个问题至今还没得到CYPRESS的解答(发到官方站上的技术支持)。"

我使用PSoc也有几年时间,多少也知道一点PSoc.马老师可否将问题放上来,大家一起研究一下?

本贴被 machao 编辑过,最后修改时间:2008-12-05,10:14:36.

出0入0汤圆

发表于 2008-11-10 23:45:17 | 显示全部楼层
低层有BUG不是那么容易找的。一般的支持没有用,他们也要先确认,然后反应到编写的工程师那里。



24小时是不行的啦。或许要24天。现在已经14天过去了。

出0入0汤圆

 楼主| 发表于 2008-11-10 15:44:56 | 显示全部楼层
看来是要考验耐心呀.

出0入0汤圆

发表于 2008-11-9 02:53:24 | 显示全部楼层
2个星期过去了,CYPRESS还是没有解答,或许他们的工程师正在修改。



我在新做的PSoC_kit板上,使用CY8C24894做了相同的测试,存在同样的问题。基本上肯定是CYPRESS提供的USBUART模块中的BUG了。



有了确切的消息,我会马上贴上来的。

本贴被 machao 编辑过,最后修改时间:2008-11-09,02:57:21.

出0入0汤圆

发表于 2008-11-6 20:44:56 | 显示全部楼层
已经要10天了,CYPRESS的支持还在“休假”,他们真幸福,有这么长的假期。

出0入0汤圆

发表于 2008-11-4 18:16:18 | 显示全部楼层
所有能查看的资料我都查过了,到现在CYPRESS的支持也没给出回答,我也发到国外的一个PSoC的讨论组,也没有回答。



代码就是USBUART用户模块中提供的最简单的例子。



我在PC上的串口精灵向PSoC发数据,PSoC收到后原样返回给PC。只要不发8的倍数个字符,非常稳定可靠。一但发8、16、24、32等字符,马上就出问题。



学生在做ISSP编程时发现的(因为开始定义通信数据包的长度为8和64),目前只能饶过去,采用10和33。这样就可以的,但效率就降低了。



在我使用PSoC的过程中,发现不少问题,实际是用户模块以及提供的API有BUG。如果你从底层写起,那么PSoC的特点就大大逊色了。所以外国人也会犯错误的,CYPRESS还需要努力。

出0入0汤圆

 楼主| 发表于 2008-11-4 09:03:05 | 显示全部楼层
经过一下午和一晚上查看资料,看不出问题所在.无奈没有仿真头,无法测试.

出0入0汤圆

发表于 2008-11-3 12:13:01 | 显示全部楼层
Created at:  10/28/2008 

        

Part Number:  64215 

Product:  PSoC Mixed-Signal Controllers - PSoC Mixed-Signal Array> PSoC 

Subject:  Problem with the USBUART 

Description:  I am having a problem with the USBUART. 



Test code is the Sample Code from USBUART Datasheet: 



BYTE Len; 

BYTE pData[32]; 

void main() 

{ 

    M8C_EnableGInt; //Enable Global Interrupts 

    USBUART_Start(USBUART_5V_OPERATION); //Start USBUART 5V operation 

    while(!USBUART_Init()); //Wait for Device to initialize 

    while(1) 

    { 

        Len = USBUART_bGetRxCount(); //Get count of ready data 

        if (Len) 

        { 

            USBUART_ReadAll(pData); //Read all data rom RX 

            while (!USBUART_bTxIsReady()); //If TX is ready 

            USBUART_Write(pData, Len); //Echo 

        } 

    } 

} 



When PC send 8/16/24/32 bytes data to PSOC,the 64215 only works one time,then dos not work. But send the another numbers byte data, it works well. 



Another question is: 



The buff size of USBUART is 32 or 64 bytes? 



I PD 5.0 + IMAGECRAFT and PD 5.0 + HI-TECH have the same problem 



======================================================================     

 

Cypress Response   Snehal Acharekar | 10/28/2008 12:54 PM | Web 



Hello, 



This mail is regarding your Cypress Technical Case currently open with us. 



Due to a Diwali Festival in India during this week our India Level I support is on vacation. We will have very limited staff to assist you regarding Cypress Technical Support. Which may delay the response regarding your cases. 



We regret for the inconvenience cause due to this delay in the responses. 



We look forward for your cooperation. 



Please be assured that we have received your case and working on the same. 



Thank You. 

Regards 

Cypress Application Support

出0入0汤圆

发表于 2008-12-5 10:13:27 | 显示全部楼层
已经有结果了,但还是不完美,我把改正后的fix情况贴出:



点击此处下载 ourdev_529618.rar(文件大小:7K) (原文件名:USB.rar) 

===============================================================



以下是与CY的支持讨论过程:



Cypress Response   Svyatoslav Paliy | 12/01/2008 11:48 PM | Web 



Hello MaChao, 

I know about this defect. 

It is difficult to fix this issue now. It depends on OS driver realization. 

To create device that correctly work on all OSes (Win Millenium, XP XP SP1-3, Linuxes etc) reccommended to use 32 bytes buffer max. 



Regards, 

Svyatoslav Paliy 

Level II support

 

Customer Comment   Ma Chao | 12/01/2008 05:51 PM | Web 

It's come form USBUART Device Data Sheet: 



USBUART_ReadAll 

Description: Reads all bytes of received data from the RX buffer and places it in a data array specified by pData. 

C Prototype:void USBUART_ReadAll(BYTE * pData) 

Parameters: 

pData is a pointer to a data array. The MSB is passed in the Accumulator and the LSB is passed in the X register. The maximum size of the data array is 64 bytes. 



And I made the test:sending 0 - 63 bytes data is OK. Only 64 bytes have problem. 

And also like this: step by step 

    PC send       USBUART back 

1.   63 bytes      63 bytes 

2.   64 bytes       0 

3.   63 bytes      127 bytes 



Cypress Response   Svyatoslav Paliy | 12/01/2008 12:20 PM | Web 

Hello Ma Chao, 



Yes. There is limitation of USBUART the maximal recommended size is 32 bytes. 



Regards, 

Svyatoslav Paliy 

Level II support

 

 

Customer Comment   Ma Chao | 12/01/2008 12:09 PM | Web 

I have made some test. Sending 8/16/24/32...bytes is OK. But when sendding 64bytes there have also problem. The USBUART is work but can not back the data. 



Using your Utility.zip will not do the test. It only send 32bytes. 

 

 

Customer Comment   Ma Chao | 12/01/2008 09:17 AM | Web 

Thanks a lot. I will make some test with the fix.

 

 

Cypress Response   Svyatoslav Paliy | 12/01/2008 07:26 AM | Web 



Hello Ma Chao, 



Excuse me for a so long waitig. 



For fix this issue please replace 

C:\Program Files\Cypress\Common\CypressSemiDeviceEditor\Data\Stdum\USBUART\USB.asm 

file with attached one. 



USB.asm



 

Cypress Response   Svyatoslav Paliy | 11/14/2008 06:17 AM | Web 

Hello Ma Chao, 



I'm author of USBUART user module. 



This is defect appears on XP SP3 only. USBUART works fine on XP with SP2 and prior SP. 

Failure reason: Starting from SP3 standard Windows driver (cdc.sys) send 0-length CDC packet after 8bytes or 16bytes or 24bytes or 32bytes packet is sent. USBUART can't able to correct resolve 0-length packet. I'll try to provide you hotfix as soon as possible. 



Regards, 

Svyatoslav Paliy 

Level II support

 

出0入0汤圆

发表于 2008-12-5 04:47:00 | 显示全部楼层
可以用PSoC Designer4.4去试试,我听说PSoC Designer 5.0比较有问题.

出0入0汤圆

发表于 2008-11-17 14:03:44 | 显示全部楼层
建议用BusHound查看一下USB上的数据流,这样比较容易发现问题

出0入0汤圆

发表于 2008-11-17 12:34:01 | 显示全部楼层
目前是避开这些特殊的数字。原来定义的数据包为8和64,现在只能使用9和33,后面要2次合成到64,增加了不少麻烦,速度也慢了。

在等CYPRESS的解决方案。

出0入0汤圆

 楼主| 发表于 2008-11-17 10:00:48 | 显示全部楼层
原来如此,只能采用避开的方法了.

出0入0汤圆

发表于 2008-11-15 00:42:32 | 显示全部楼层
经过19天的来回,Cypress的工程师终于找到了问题的原因,但解决的方法还没有,他们要修改USBUART了。



原因在于USBUART不能处理0长度的CDC数据包。而XP(SP3)发送完8/16/24/32等8的陪数数据包后,跟着发送了一个0长度的数据包。这样UASUART就“死”掉了。Cypress工程师把责任归到了XP的SP3了。



我的台式PC正好是XP(SP2),我同样也试了一下。的确在SP2下是没有问题的。



不管怎样,Cypress不能让微软改动XP吧,只能他们自己更新USBUART了。怪他们自己没有经过全面的测试了。



要做到完美是不容易的。Cypress的PSoC还需要努力和完善。



以下是与Cypress工程师的交流:



Cypress Response   Svyatoslav Paliy | 11/14/2008 06:17 AM | Web 



Hello Ma Chao, 



I'm author of USBUART user module. 



This is defect appears on XP SP3 only. USBUART works fine on XP with SP2 and prior SP. 

Failure reason: Starting from SP3 standard Windows driver (cdc.sys) send 0-length CDC packet after 8bytes or 16bytes or 24bytes or 32bytes packet is sent. USBUART can't able to correct resolve 0-length packet. I'll try to provide you hotfix as soon as possible. 



Regards, 

Svyatoslav Paliy 

Level II support

 

 

Customer Comment   Ma Chao | 11/14/2008 02:36 AM | Web 



That is a big bug of USBUART I think. Pls. send this case to the top level support or the group who design the USBUART USERMODE. 



It was 22 days past. 



Thanks. 



Customer Comment   Ma Chao | 11/14/2008 01:08 AM | Web 



Useing your Utility program and do the test. 



When send 8bytes or 16bytes or 24bytes or 32bytes, the case is coming(attachments is 24bytes test). Other numbes bytes is ok. 



3 students of mime have do this test with they PC, the problem is the same. 



Sending 8bytes to USBUART, the USBUART will sendback zhe 1st 8bytes, then come down! 



The OS version is Windows XP Professional 2002 Sevice Pack 3 





24bytes.jpg



Customer Comment   Ma Chao | 11/13/2008 08:25 PM | Web 



my got!



8bytes.jpg

9bytes.jpg



Cypress Response   Svyatoslav Paliy | 11/13/2008 07:37 AM | Web 



Hello Ma Chao, 



Unfortunatelly I can't reproduce case. 



Please try on the other PC. And with other COM port utility. 

Attached simple utility that send random data receive it back and check correctness. 



Also please me know which OS version you use. Which utility use to verify USBUART ? If not standard please attach here. 



Regards, 

Svyatoslav Paliy 

Level II support 



Utility.zip



 

Customer Comment   Ma Chao | 11/08/2008 09:29 AM | Web 



I also do the same test with cy8c24894 and have the same problem. Mybe the USBUART have a bug? 

 

 

Customer Comment   Ma Chao | 11/05/2008 12:27 PM | Web 



you can do the test: send the 8(or 16, or 24, or 32) bytes data at one time from PC to cy7c64215. 



At the 1st, the 8 bytes data are come back to PC, then PC send any data to PSoC, it not works. 

 

 

Customer Comment   Ma Chao | 11/05/2008 12:22 PM | Web 



you can do the test: send the 8(or 16, or 24, or 32) bytes data at one time from PC to cy7c64215. 

 

 

Customer Comment   Ma Chao | 11/05/2008 12:18 PM | Web 

PSoC Designer 5.0 



The Code is from USBUART Datasheet.



usbuarttest.rar



 

Cypress Response   Svyatoslav Paliy | 11/05/2008 12:02 AM | Web 



Hello Ma Chao, 



Which PSoC Designer version you use ? 

Plese attach your project. 



Regards, 

Svyatoslav Paliy 

Level II support

出0入0汤圆

发表于 2008-11-9 20:15:34 | 显示全部楼层
刚刚收到的“答复”如下:



Spike Terada | 11/09/2008 01:18 AM | Web 



Hello Ma, 



Your case is very important to us. It is being escalated to next Level of support for resolution. 

Case response time is typically within 24 business hours. Thank you for your patience. 



Regards, 



Spike Terada 

Cypress Applications Support 

 

出0入0汤圆

发表于 2010-4-22 02:01:48 | 显示全部楼层
这个破PSOC,折腾了半宿,驱动还装不上去,PID vid都对了,就是搞不定...不知道为什么
回帖提示: 反政府言论将被立即封锁ID 在按“提交”前,请自问一下:我这样表达会给举报吗,会给自己惹麻烦吗? 另外:尽量不要使用Mark、顶等没有意义的回复。不得大量使用大字体和彩色字。【本论坛不允许直接上传手机拍摄图片,浪费大家下载带宽和论坛服务器空间,请压缩后(图片小于1兆)才上传。压缩方法可以在微信里面发给自己(不要勾选“原图),然后下载,就能得到压缩后的图片】。另外,手机版只能上传图片,要上传附件需要切换到电脑版(不需要使用电脑,手机上切换到电脑版就行,页面底部)。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|Archiver|amobbs.com 阿莫电子技术论坛 ( 粤ICP备2022115958号, 版权所有:东莞阿莫电子贸易商行 创办于2004年 (公安交互式论坛备案:44190002001997 ) )

GMT+8, 2024-4-29 12:27

© Since 2004 www.amobbs.com, 原www.ourdev.cn, 原www.ouravr.com

快速回复 返回顶部 返回列表