This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] AM2634:具有 DMA 的 Sitara UART 空闲线路中断-从链接的线程跟进

Guru**** 2223470 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1273839/am2634-sitara-uart-idle-line-interrupt-with-dma---follow-up-from-linked-thread

器件型号:AM2634

作为上一个问题的后续: https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1228826/am2634-configure-uart-idle-line-interrupt

我确认、当使用 DMA 接收每个数据字节时、实际上可以在 Sitara UART 外设上实现空闲线路中断功能。 用作"空闲线"的中断是 FIFO RX 超时

UART/DMA 配置为在 UART 和 DMA 配置之上启用"空闲线路中断":  

UART_EFR2 -> TIMEOUT_AC行为= 1

UART_IER2->RHR_IT_DIS = 1

一个链接到 UARTx_DMA1 (UART_RX 事件)的额外 DMA 传输、负责在从 UART 外设接收到第一个字节后立即启用 UART_IER->RHR_IT。

在中断处理程序端、生成的中断为 IT_TYPE_VALUE_6 | Rx TIMEOUT、处理程序必须清除  UART_IER -> RHR_IT、以防止再次生成中断、 并最终回读 UART_IIR 并清除 VIM、以清除其他可能已挂起(取决于 UART_TIMEUTx 中的值、IF /何时使用)的挂起中断。 当然、处理程序或 DMA 链必须重新设置 DMA 传输、以用于下一个 UART RX 帧。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Filippo:

    非常感谢后续的详细介绍。 这肯定会让其他客户受益。

    谢谢!