uart tx buf 未更改
我使用 IAR 的 EWARM IDE 以及用于 ARM STR712FR2 的 Olimex 开发板和 IAR 提供的 J-link JTAG 调试器。由于某种原因,我似乎无法写入 UART TxBUFR 寄存器。我相信我已经正确配置了所有时钟和波特率。数据表说,当我写入 TxBUFR 寄存器时,UART 应该立即开始发送。我在调试模式下运行它,当我在将 TxBUFR 设置为一个值后立即放置断点时,寄存器仍然显示 0x0000,没有变化。
I am using EWARM IDE from IAR with an Olimex development board for the ARM STR712FR2, and a J-link JTAG debugger provided by IAR. For some reason, I can't seem to write to the UART TxBUFR register. I believe I have configured all the clocks and baud rate correctly. The datasheet says that when I write to the TxBUFR register, the UART is supposed to immediately start transmitting. I am running this in debug mode, and when I place a breakpoint right after I set the TxBUFR to a value, the register still shows 0x0000, unchanged.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
寄存器的值可能不会改变或者可能是只写的,你检查过它是否真的在传输吗?
The register value may not change or it may be write-only, have you checked to see if it is actually transmitting or not?
UART_CR 寄存器重置为 0,其中一些字段设置为保留值。您是否已配置此处的所有字段?另外,正如前面提到的,UART_TxBUFR 是一个只写寄存器,因此您将无法读回该值。
The UART_CR register resets to 0 which has some fields set to reserved values. Have you configured all the fields in here? ALso, as was mentioned, UART_TxBUFR is a write-only register, so you will not be able to read the value back.