Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN
static unsigned char command;
void main(void)
{
/* Enable IRQ */
_enable_IRQ();
/* Initialize SCI module */
sciInit();
/* Send user prompt */
sciSend(scilinREG, 21, (unsigned char *)"please press a key!\r\n");
/* Await user character */
sciReceive(scilinREG, 1, (unsigned char *)&command);
/* Infinite loop */
while (1);
}
void sciNotification(sciBase_t *sci, unsigned flags)
{
/* Echo received character */
sciSend(sci, 1, (unsigned char *)&command);
/* Await further character */
sciReceive(sci, 1, (unsigned char *)&command);
}
In the tutorial the interrupt service routine (sciNotification) is triggered because in the main method sciSend is called and at the end of the sciSend call the ISR will be called. I would like to know how to throw or trigger a TX INT from the UART whenever the UART is empty so that the ISR gets called without having to first send something using sciSend.
In my ISR I will have a list of messages that I append to in other places in my application and I want the UART to get those messages out whenever it is idle. In order to do this I need to know how to trigger a TX INT from the UART.