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.

TMDSCNCD263: CDD_UART : Uart DMA related function are compiled even DMA Mode is disabled

Part Number: TMDSCNCD263

Hii,

Currently I'm using MCAL_AM263x_08.06.02 version package in my project. 

I configured Uart1 in polling mode ,  DMA mode is disabled in EB.  So, I haven't included Uart DMA files in make file. 

I'm getting error that Uart_Cdd_dmaDisableChannel is undefined.   

Even If DMA is disabled , DMA related uart functions takes place in compiling.   

what could be the root cause for this issue ?

 

Thanks.

  • Hi Palani,

    Thanks for reporting this. I'm evaluating this on my side and will come back by EOD. 

    Thanks 

  • Hi Palani,

    This seems to be a bug that was fixed recently. Please replace the `Cdd_Uart_Cancel` API in the Cdd_uart.c with the below code. This should fix the issue you're seeing.

    FUNC(boolean, CDD_UART_CODE) Cdd_Uart_Cancel(uint8 ChannelID, CddUartDataDirectionType TransferType)
    {
        boolean cancelStatus = FALSE;
        #if (STD_ON == CDD_UART_DEV_ERROR_DETECT)
        if (CDD_UART_UNINIT == CddUart_DriverStatus)
        {
            CddUart_ReportDetError(CDD_UART_CANCEL_SERVICE_ID, CDD_UART_E_UNINIT);
        }
        else if (ChannelID >= CDD_UART_NUM_CHANNELS)
        {
            CddUart_ReportDetError(CDD_UART_CANCEL_SERVICE_ID, CDD_UART_E_INVALID_CHANNEL);
        }
        else if (TransferType==UART_READ_TRANSFER_TYPE && CddUart_ChannelObjects[ChannelID].readTrans == NULL_PTR)
        {
            CddUart_ReportDetError(CDD_UART_CANCEL_SERVICE_ID, CDD_UART_E_PARAM_POINTER);
        }
        else if (TransferType==UART_WRITE_TRANSFER_TYPE && CddUart_ChannelObjects[ChannelID].writeTrans == NULL_PTR)
        {
            CddUart_ReportDetError(CDD_UART_CANCEL_SERVICE_ID, CDD_UART_E_PARAM_POINTER);
        }
        else if (CddUart_ChannelObjects[ChannelID].hUartInit->transferMode!=CDD_UART_MODE_DMA && CddUart_ChannelObjects[ChannelID].hUartInit->transferMode!=CDD_UART_MODE_INTERRUPT)
        {
            CddUart_ReportDetError(CDD_UART_CANCEL_SERVICE_ID, CDD_UART_E_PARAM_VALUE);
        }
        else
        #endif
        {
            if (TransferType==UART_WRITE_TRANSFER_TYPE) 
            {
                if (CddUart_ChannelObjects[ChannelID].hUartInit->transferMode == CDD_UART_MODE_DMA)
                {
                    #if (CDD_UART_DMA_ENABLE == STD_ON)
                    if (Uart_Cdd_writeCancelDma(&CddUart_ChannelObjects[ChannelID], CddUart_ChannelObjects[ChannelID].writeTrans) == MCAL_SystemP_SUCCESS)
                    {
                        cancelStatus = TRUE;
                    }
                    else
                    {
                        cancelStatus = FALSE;
                    }
                    #endif
                }
                else
                {
                    if (Uart_Cdd_writeCancel(&CddUart_ChannelObjects[ChannelID], CddUart_ChannelObjects[ChannelID].writeTrans) == MCAL_SystemP_SUCCESS)
                    {
                        cancelStatus = TRUE;
                    }
                    else
                    {
                        cancelStatus = FALSE;
                    }
                }
            }
            else
            {
                if (CddUart_ChannelObjects[ChannelID].hUartInit->transferMode == CDD_UART_MODE_DMA)
                {
                    #if (CDD_UART_DMA_ENABLE == STD_ON)
                    if (Uart_Cdd_readCancelDma(&CddUart_ChannelObjects[ChannelID], CddUart_ChannelObjects[ChannelID].readTrans) == MCAL_SystemP_SUCCESS)
                    {
                        cancelStatus = TRUE;
                    }
                    else
                    {
                        cancelStatus = FALSE;
                    }
                    #endif
                }
                else
                {
                    if (Uart_Cdd_readCancel(&CddUart_ChannelObjects[ChannelID], CddUart_ChannelObjects[ChannelID].readTrans) == MCAL_SystemP_SUCCESS)
                    {
                        cancelStatus = TRUE;
                    }
                    else
                    {
                        cancelStatus = FALSE;
                    }
                }
            }
        }
        return cancelStatus;
    }
    #endif /* (STD_ON == CDD_UART_CANCEL_API) */
    

    Thanks,

    G Kowshik

  • Hii Kowshik,

    I verified the code which shared for Cdd_uart_Cancel API .  I just replaced with it .  It's working fine .  

    Thanks for the response.

    Shall we expect that these changes will be adopted in next release of MCAL package ?

  • yes Sure. This should be available in next release, closing the thread.

    Thanks