完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我已经配置了缓冲器操作的UART,缓冲器大小为128,运行在57.6kbPs。使用UARTHIPPARTRAIL,我发送多于几个字符的问题。
在5个字符中,它们都被正确发送,6个字符中断。看来这个问题与中断有关。只要UARTHI PUCHCHAR例程将字符直接放入PSoC UART发送数据寄存器,就发送字符。如果UARTHIPPUCHAR例程将字符放置到缓冲区中,则缓冲区继续填充,并且没有一个字符被发送。UARTHARTXBuffrError增量正确,UARTHARTX缓冲区读取保持在零。 TX-on上的FIFO空中断被打开,似乎中断只是不开机。 有什么想法吗? 以上来自于百度翻译 以下为原文 I have configured the UART for Buffered operation with a buffer size of 128 running at 57.6Kbps. Using UART_PutArray I have issues sending more than a few characters. At 5 characters, they are all sent correctly, and 6 breaks it. It looks as if the problem is related to interrupts. As long as the UART_PutChar routine puts the character directly into the PSOC UART send data register the character are sent. If the UART_PutChar routine places the character into the buffer then the buffer continues to fill and none of the characters are sent. The UART_TxBufferWrite increments correctly and the UART_TxBuffer Read stays at zero. The TX - On FIFO Empty interrupt is turned on and it seems like the interrupt is just not firing. Any Ideas? |
|
相关推荐
5个回答
|
|
出乎意料:你启用了全局中断吗?
也许你可以在这里发布你的项目(创建一个工作区包),这样我们就可以看看它。 以上来自于百度翻译 以下为原文 Just out of the blue: did you enable global interrupts? Maybe you can post your project here (create a workspace bundle), so we can have a look at it. |
|
|
|
启用全局中断。这样一个简单的概念。
我写汇编程序和一些C程序已经35年了,我又一次谦卑了。 谢谢你的快速反应。 彼得 以上来自于百度翻译 以下为原文 Enable Global Interrupts. Such a simple concept. I've been writing Assembler and some C programs for 35 years and am once again humbled. Thank you for your quick response. Peter |
|
|
|
我把所有初始化的东西都分割成一个名为RealalIZHealSub()的单独例程。老实说,不止一次,我忘了在主机上调用它。
黑暗中的你并不孤单 鲍勃 以上来自于百度翻译 以下为原文 I extracted all that initialization stuff into a separate routine named InitializeHardware(). To be honest, more than once i forgot to call it in main(). You are not alone in the dark Bob |
|
|
|
有时我桌上的水晶球真的很有用
还有帮助的是,我不止一次地犯了这个错误——这有助于学习…现在,我开始看,每次我启动一个项目,通过整个生成/提供的代码(特别是main),或者删除该行,或添加一个注释,为什么我把它留在里面。这有助于我防止这样的错误。 以上来自于百度翻译 以下为原文 Sometimes this crystal ball thingie on my desk really works What also helps is that I amde this error more than once - this helps learning... Now I started to look, everytime I start a project, through the whole generated/provided code (especially main) and either delete the line or add a comment why I leave it in. This helps me preventing such mistakes. |
|
|
|
嗨,PeterHouse,
此外,如果在RX或TX上使用中断,请确保中断被配置为“触发”,而不是“上升”或“派生”。由于UART是基于数据路径的组件,FIFO的状态中断将保持高,直到IS被清除。将其配置为“上升”可能会导致字节丢失。 以上来自于百度翻译 以下为原文 Hi PeterHouse, Also, if you are using Interrupt on Rx or Tx, please ensure that the Interrupt is configured to "Level" triggered instead of "Rising" or "Derived". Since UART is a Datapath based component, the interrupt on FIFO's status will remain high till is is cleared. Configuring it as "rising" might result in missing of bytes. |
|
|
|
只有小组成员才能发言,加入小组>>
751个成员聚集在这个小组
加入小组2063 浏览 1 评论
1822 浏览 1 评论
3630 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1758 浏览 6 评论
1507 浏览 1 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
501浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
352浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
408浏览 2评论
353浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
850浏览 2评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-19 08:21 , Processed in 0.985674 second(s), Total 56, Slave 50 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号