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.
工具与软件:
您好!
我需要为 MSPM0 UART 接口插入 UART 中断模式、其中 DAC 器件支持中断模式下的 UART。
MSPM0 MCU 硬件中是否支持用于插入 UART 中断模式的硬件?
或者使 TX 引脚立即进入 GPIO 模式以插入 UART 中断模式是唯一的选择?
此致、
Bhushan
根据 TRM (SLAU846A)表16-42、您可以通过设置 LCRH.BRK=1来生成中断。 您必须自己对它进行计时(11位时间)。 它适用于 LIN、但我看不出有任何阻止您以其他方式使用它的内容。 我看到 Driverlib 函数"DL_UART_[ENABLE/DISABLE]LINSendBreak"[dl_uart.h]可执行此操作。
对于接收中断、有一个 BRKERR 指示器[参考 TRM 表16-2]
[编辑:轻微澄清]
尊敬的 Bhushan:
完全同意 Bruce 的意见。
对于发送中断、您可以使用 LCRH 寄存器。
DL_UART_enableLINSendBreak(UART_0_INST); delay_cycles(16000); DL_UART_disableLINSendBreak(UART_0_INST);
此致、
Zoey
感谢 Bruce 的超快响应。