RA4M2 UART RX interrupt not firing

Hello  Everyone, 

I have implemented  FREERTOS CLI using uart on RA4m2. actually i am  able to trasnmit using uart interface but unable to receive any command using uart.

I am facing to generate RX interrupt . here is my source code for uart call back function. It is an event based application using thready queue .  

Now the same source code using same call back function is working on RA6M3 controller but not on RA4M2. 

do i  need to specify something 

void cli_dbgUartCallback(uart_callback_args_t *p_args)
{
    Event_t event = { .id = EV_NO_EVENT, .payload.u32Arr[0] = 0 };
    m_dbgUartEvent = p_args->event;

    if ((UART_EVENT_RX_CHAR == m_dbgUartEvent) && (m_cmdInProgress == false))
    {
        if (m_bufferIndex < (CMD_BUFFER_SIZE - 1))
        {
            switch (p_args->data)
            {
                /* If Enter is pressed by user, send event to process the data */
                case '\r':
                {
                    /* Send command received event */
                    event.id = EV_DBG_UART_CMD_RCVD;
                    event.payload.u32Arr[0] = (uint32_t)&m_cmdBuffer[0];
                    evh_handleEvent(&event);
                    /* Set command in progress flag */
                    m_cmdInProgress = true;

                    /* Clear buffer index */
                    m_bufferIndex = 0;
                    break;
                }
                case '\b':
                {
                    /* Backspace was pressed.  Erase the last character in
                     * the input buffer
                     */
                    if (m_bufferIndex > 0)
                    {
                        m_bufferIndex--;
                        m_cmdBuffer[m_bufferIndex] = '\0';
                    }
                    break;
                }
                case '\n':
                    /* ignore \n escape */
                    break;
                default:
                {
                    /* Write RX data to input buffer */
                    m_cmdBuffer[m_bufferIndex++] = (char) p_args->data;
                    break;
                }
            }
        }
        else
        {
            /* Buffer overflow! */
            m_bufferIndex = 0;
        }
    }
}

Parents Reply
  • Actually i have mulple thread based application and i have removed all the thread. first tried to run the application using single thread. it  worked.  do you think may there can be issue of context switching ot interrupt priority which causes RX interrupt to never arise ?

    I still have the problem on my main application. 

    can you tell me how much i can increase the  main stack size for RA4M2?

Children