LPC1225 UART TX作品,但RX不做

发布于 2025-02-07 07:35:24 字数 488 浏览 2 评论 0原文

我的设置是:

  • LPC1225FBD48/321
  • Ext Crystal:16MHz
  • PLL:MSEL = 6,PSEL = 2
  • UART0:CLKDIV = 250 DL = 1 DivAddval = 1 mulval = 1 mulval = 1 Mulval = 4

PLL给出mainClk = 96MHz; UART的PCLK为:96MHz/250 = 384KHz;比特率:384KHz/(16x1x1.25)= 19200

,但仅在LPC传输时起作用。当LPC收到角色时,它报告了2个字符,有时还会收到框架错误。其他比特率的类似问题。以较低的速率(例如2400),LPC报告收到的单个字符,有时是框架错误,但收到的字符与我发送的字符不同。看起来TX和RX正在使用不同的时钟。

将UART与Flash Magic一起使用Bootloader时,UART运行良好。

有人遇到过这样的问题吗?

My setup is:

  • LPC1225FBD48/321
  • ext crystal: 16MHZ
  • PLL: MSEL=6, PSEL=2
  • UART0: CLKDIV=250 DL=1 DIVADDVAL=1 MULVAL=4

PLL gives mainclk=96MHz ; PCLK for UART is: 96MHz/250=384kHz ; Bit rate: 384kHz/(16x1x1.25)=19200

And it works, but only when LPC transmits. When LPC receives a character, it reports 2 characters received and sometimes framing error. Similar problem for other bit rates. At lower rates, like 2400, LPC reports single character received and sometimes framing error, but received character is not the same as I sent. It looks like Tx and Rx are using different clocks.

The UART works well when using bootloader with Flash Magic.

Has anyone encountered such a problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

童话 2025-02-14 07:35:24

我终于找到了一个解决方案。设置clkdiv = 50和dl = 5后,UART变得完全功能。虽然文档并未禁止先前的参数集,并且两组都应给出相同的结果,但只有后者允许双向通信。

I finally found a solution. After setting CLKDIV = 50 and DL = 5, the UART became fully functional. While the documentation did not prohibit the previous set of parameters and both sets should give the same result, only the latter allows two-way communication.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文