adi_uart_GetRxBuffer

CCES v2.8.1 ARM core0 ADSP-SC584

When using Callback mode for the adi_uart API and I call adi_art_GetRxBuffer the function checks to make sure that it is in NONBLOCKING mode. The comment is correct saying it should check for CALLBACK or NONBLOCKING mode but it only checks for NONBLOCKING so since I'm in Callback mode it returns an error.  Is there a fix for this?



spelling corrections
[edited by: Gracerider at 4:39 PM (GMT -5) on 30 Nov 2018]
  • +1
    •  Analog Employees 
    on Dec 4, 2018 9:06 AM

    Hi,

    Apologies for our delayed response.
     
    We understand that you have already contacted our private support.
    Please continue the discussion there. We will post the final response here for others to benefit

    When a callback is registered, peripheral errors and buffers are not returned with the adi_xxx_GetBuffer API call. The buffer pointer and peripheral errors are passed back to the application as callback arguments. If the application calls the adi_xxx_GetBuffer after registering the callback, the call returns an error.

    Please note that the 'adi_uart_GetRxBuffer' API is valid for non-blocking mode only.

    For more details, please refer the CCES help:
    CrossCore® Embedded Studio 2.8.0 > System Run-Time Documentation > Device Drivers User Guide > Low-Level Driver API Reference > Non-Blocking Mode APIs and Buffer Ownership

    CrossCore® Embedded Studio 2.8.0 > System Run-Time Documentation > Device Drivers User Guide > Low-Level Driver API Reference > Using Callback Mode

    Below Comment in 1331 line is incorrectly written in the "adi_uart_bf60x.c" file
    /* Submit buffer can be only used in Callback or Non-blocking mode */
        if(pDevice->pRxChannel->eBufTxnMode != ADI_UART_BUF_TXN_MODE_NONBLOCKING)
        {
            return  ADI_UART_INVALID_DATA_TRANSFER_MODE;
        }

    Best Regards,
    Santha kumari.K