打印

CYUSB3014 GPIF写buffer出错

[复制链接]
915|1
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
USB小朋友|  楼主 | 2016-10-24 20:19 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
Hello, I use GPIF state machine to transfer a sector (512 byte) when I start state machine every time. I set a PIB to USB DMA channel, and set 16 buffers, and every buffer is 1024KB. When I need to transfer more than 1 sector, I need to start state machine more than one time. However when after I start two times transaction, there emerges an error: “CYU3P_PIB_ERR_THR0_WR_OVERRUN” or “Write to DMA data thread which is not ready.” The picture is my GPIF state machine. I doubt that when I start a transaction, the old buffer is full, and the next buffer is not ready. And I set CyU3PBusyWait() to wait for the previous transaction been finished, But it is not work. I want to know why, and how to solve the problem.
Thank you and Best Regards!
沙发
USB小朋友|  楼主 | 2016-10-24 20:24 | 只看该作者
我用状态机进行数据传输,每次传送一个扇区(即512字节)。DMA通道设置是16个Buffer, 每个Buffer1024KB。当我需要传送多个扇区时,我就重复启动状态机,每当第三次是,就报错:“CYU3P_PIB_ERR_THR0_WR_OVERRUN” or “Write to DMA data thread which is not ready.”所以我怀疑是我多次启动状态机时,旧的Buffer写满了,新的Buffer还没准备好。所以我用了CyU3PBusyWait() API函数进行等待,但是无论我设置多长时间,还是报同样的错误。这是为啥呢?有没有大神知道怎么解决。

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3

主题

8

帖子

1

粉丝