0
\$\begingroup\$

i am using ADuCM350EBZ evaluation board,i want to enable UART interrupt, like when i enter any button from keyboard then interrupt will occur. i am using one example given in this board here uart is already initialized like this

/* Initialize the UART, set the baud rate and enable */
ADI_UART_RESULT_TYPE uart_Init (void) {
    ADI_UART_RESULT_TYPE    result = ADI_UART_SUCCESS;

    /* Open UART in blocking, non-intrrpt mode by supplying no internal buffs */
    if (ADI_UART_SUCCESS != (result = adi_UART_Init(ADI_UART_DEVID_0, &hUartDevice, NULL)))
    {
        return result;
    }

    /* Set UART baud rate to 115200 */
    if (ADI_UART_SUCCESS != (result = adi_UART_SetBaudRate(hUartDevice, ADI_UART_BAUD_115200)))
    {
        return result;
    }

    /* Enable UART */
    if (ADI_UART_SUCCESS != (result = adi_UART_Enable(hUartDevice,true)))
    {
        return result;
    }

    return result;
}

i do not want to change my baud rate how can i enable the UART interrupt i am also uploading my UART.c and UART.h file respectively that will help you for understanding

UART.c

UART.h

Please guide me how can i enable UART interrupt i will be very thankful to you.

\$\endgroup\$
  • \$\begingroup\$ Haven't checked your attachments but it should have something like ADI_ENABLE_INT \$\endgroup\$ – Swanand Jan 29 at 15:06
  • \$\begingroup\$ There is a function like this adi_UART_SetInterruptMode(hUartDevice,true); but when initialize UART in interrupt by using this command then i can not see any thing on UART terminal. And when i enter any value from keyboard the pointer disappeared from my code \$\endgroup\$ – Ati Jan 30 at 6:38

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.