AnsweredAssumed Answered

Using UART3 on the ADSP BF548 EZ-KIT LITE REV 1.4 with Interrupt using System Services

Question asked by sujan5614 on May 21, 2013
Latest reply on Jul 16, 2013 by sujan5614

Hello,

         I am trying to run UART3 on BF548 EZ-KIT, using Interrupt. I used the reference code of UARTEcho.c that came with VisualDSP++ installation. I have connected UART1, and it is running successfully.

Initially I was facing problem with UART3 since there was no DMA mapped to UART3 by default.

 

I took help of the forums and now i have successfully mapped ADI_DMA_DMA20 to ADI_DMA_PMAP_UART3_RX and ADI_DMA_DMA21 to ADI_DMA_PMAP_UART3_TX using adi_dma_SetMapping().

 

But now my code gets stuck in adi_dev_Control() where it updates the UARTConfiguration Table. My code gets stuck in the "Enable Error Reporting" part where it is unable to set the interrupt settings and goes on a loop.

 

I have compared the code, for UART1 and UART3 (changing the #define UART_DEVICE_NUMBER), and the code is working fine for UART1.

 

I have disabled Deferred Callbacks.

 

So, is there anything extra that I need to change for using UART3??

 

Below is the part of the changes made for DMA mapping ::

if ((pDevice->Direction == ADI_DEV_DIRECTION_INBOUND) || (pDevice->Direction == ADI_DEV_DIRECTION_BIDIRECTIONAL)) {

 

                     if(adi_dma_SetMapping(pDevice->InboundPMAP, ADI_DMA_DMA20) != ADI_DMA_RESULT_SUCCESS)

           {

                                   printf("Failed to set DMA mapping \n");

                                   break;

           }

           else

           {

                      printf("set DMA mapping successfully for ADI_DMA_PMAP_UART3_RX\n");

           }

           

          if (adi_dma_GetMapping(pDevice->InboundPMAP, &DMAChannelID) != ADI_DMA_RESULT_SUCCESS) {

                Result = ADI_UART_RESULT_NOT_MAPPED_TO_DMA_CHANNEL;

                break;

            }

 

******************************************************************************************************************************************************************

 

if ((pDevice->Direction == ADI_DEV_DIRECTION_OUTBOUND) || (pDevice->Direction == ADI_DEV_DIRECTION_BIDIRECTIONAL)) {

 

           if(adi_dma_SetMapping(pDevice->OutboundPMAP, ADI_DMA_DMA21) != ADI_DMA_RESULT_SUCCESS)

           {

                printf("Failed to set DMA mapping \n");

                          break;

           }

           else

           {

           printf("set DMA mapping successfully for ADI_DMA_PMAP_UART3_TX\n");

           }      

               

                   if (adi_dma_GetMapping(pDevice->OutboundPMAP, &DMAChannelID) != ADI_DMA_RESULT_SUCCESS) {

                Result = ADI_UART_RESULT_NOT_MAPPED_TO_DMA_CHANNEL;

                break;

            }

****************************************************************************************************************************************************************** 

 

Thanks

Sujan.

 

Message was edited by: Sujan Nag

Outcomes