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.

TMS570LC4 SCI Receive Interrupt problem

Other Parts Discussed in Thread: HALCOGEN

Hello,

I hope someone can help me:

I am using Halcogen 04.04 and want to receive messages on SCI1 via interrupt.

Sending works fine. I connected TX and RX with each other and after sending,

the receive interrupt SCI1HighLevelInterrupt(void) gets called TWICE. Unfortunately the

callback function sciNotification(sciREG1, (uint32)SCI_RX_INT) never gets called

because *g_sciTransfer_t[0U].rx_length is always = 0. Because I scoped the

TX signal with an oscilloscope I am sure that I sent a byte. Vec is also correct

(11 = Receive interrupt).

void SCI1HighLevelInterrupt(void)
{
    uint32 vec = sciREG1->INTVECT0;
	uint8 byte;

/* USER CODE BEGIN (28) */
/* USER CODE END */

    switch (vec)
    {
    case 1U:
        sciNotification(sciREG1, (uint32)SCI_WAKE_INT);
        break;
    case 3U:
        sciNotification(sciREG1, (uint32)SCI_PE_INT);
        break;
    case 6U:
        sciNotification(sciREG1, (uint32)SCI_FE_INT);
        break;
    case 7U:
        sciNotification(sciREG1, (uint32)SCI_BREAK_INT);
        break;
    case 9U:
        sciNotification(sciREG1, (uint32)SCI_OE_INT);
        break;

    case 11U:
        /* receive */
        byte = (uint8)(sciREG1->RD & 0x000000FFU);

            if (g_sciTransfer_t[0U].rx_length > 0U)
            {
                *g_sciTransfer_t[0U].rx_data = byte;
                g_sciTransfer_t[0U].rx_data++;
                
                g_sciTransfer_t[0U].rx_length--;
                if (g_sciTransfer_t[0U].rx_length == 0U)
                {
                    sciNotification(sciREG1, (uint32)SCI_RX_INT);
                }
            }
        
        break;

Why is g_sciTransfer_t[0U].rx_length always 0??? What am I doing wrong?

I am looking forward to your answer(s).

Kindly regards.

Werner