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.

[参考译文] TMS570LC4357:如何使用 Halcogen 从 SCI UART 抛出初始 TX 中断(TX INT)

Guru**** 2609775 points
Other Parts Discussed in Thread: HALCOGEN

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

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/760735/tms570lc4357-how-to-throw-initial-tx-interrupt-tx-int-from-sci-uart-using-halcogen

器件型号:TMS570LC4357
主题中讨论的其他器件:HALCOGEN
我将学习本教程、了解如何使用 HALCoGen 使用 SCI UART:
static unsigned char 命令;

void main (void)
{
/*启用 IRQ */
_enable_IRQ ();

/*初始化 SCI 模块*/
sciInit();

/*发送用户提示*/
sciSend (scilinREG、21、(unsigned char *)"请按键!\r\n\r\n);

/*等待用户字符*/
sciReceive (scilinREG、1、(unsigned char *)命令(command));

/*无限循环*/
while (1);
}

void sciNotification (sciBase_t * sci、unsigned flags)
{
/*回显接收到的字符*/
sciSend (sci、1、(unsigned char *)命令(command));

/*等待更多字符*/
sciReceive (sci、1、(unsigned char *)命令);
} 

在教程中触发中断服务例程(sciNotification)、因为在主方法中调用 sciSend、并且在 sciSend 调用结束时将调用 ISR。 我想知道如何在 UART 为空时从 UART 抛出或触发 TX INT、以便 ISR 无需首先使用 sciSend 发送内容即可被调用。

在我的 ISR 中、我将在应用程序的其他位置添加一个消息列表、并且我希望 UART 在空闲时将这些消息输出出去。 为此、我需要知道如何从 UART 触发 TX INT。

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    您好、Christian、
    当 TXRDY 标志变为高电平时、而不是在设置 TX INT 位之后、会产生发送中断。 当 SCI 将 SCITD 的内容传输到移位寄存器(SCITXSHF)时、TXRDY 变为高电平。
    请参阅器件 TRM 中的第29.2.2.1节发送中断( www.ti.com/.../spnu563a.pdf )。

    此致、
    米罗