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.

McASP Tx GIO_reclaim() Hanging

Hi,

I have an issue with my C6746 where the the following function call hangs:

GIO_reclaim(outStream, (Ptr *)&xmt, NULL, NULL);

I had a similar issue with the same call to reclaim the receive buffer; the problem there was that the DMA wasn't transferring data from McASP FIFO to the inputStream buffer. 

What could be the cause of the transmit GIO_reclaim() call not returning?

Thanks

Brian

  • Hi Titus,

    Thanks for your response. I had looked through all of those threads, but unfortunately this didn't help.

    I am almost certain that the cause for the hang is that the DMA callback function to transfer from GIO ping-pong buffers to XBUF register is not being triggered. I have configured my transmit channel identical to my receive channel (4 serializers, each 16 slot TDM). My receive channel functions perfectly, Mcasp_localEdmaCallback() function is hit periodically, and samples are transferred from RBUF to GIO ping-pong buffers. This callback is never triggered for transmit though, which is why GIO_reclaim() hangs. 

    See my register settings below; my clock and frame-sync signals are received from an external source. Any ideas? 

    /* McBsp channel parameters                                  */
    Mcasp_ChanParams  mcasp_chanparam[Audio_NUM_CHANS]=
    {
        {
        	4u,                    /* number of serialisers      */
            {
    		 Mcasp_SerializerNum_1,
    		 Mcasp_SerializerNum_2,
    		 Mcasp_SerializerNum_5,
    		 Mcasp_SerializerNum_6
    		 }, /* serialiser index           */
            &mcaspRcvSetup,
            TRUE,
            Mcasp_OpMode_TDM,          /* Mode (TDM/DIT)             */
            Mcasp_WordLength_32,
            NULL,
            0,
            NULL,
            NULL,
            NUM_TDM_SLOTS,                        /* number of TDM channels      */
            Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2,
    		//Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
            TRUE,
            TRUE
        },
        {
            4u,                   /* number of serialisers       */
            {
    		 Mcasp_SerializerNum_8,
    		 Mcasp_SerializerNum_11,
    		 Mcasp_SerializerNum_13,
    		 Mcasp_SerializerNum_14
    		 },
            &mcaspXmtSetup,
            TRUE,
            Mcasp_OpMode_TDM,
            Mcasp_WordLength_32,      /* word width                  */
            NULL,
            0,
            NULL,
            NULL,
            NUM_TDM_SLOTS,                        /* number of TDM channels      */
            //Mcasp_BufferFormat_1SER_MULTISLOT_INTERLEAVED,
    		Mcasp_BufferFormat_MULTISER_MULTISLOT_SEMI_INTERLEAVED_2,
            TRUE,
            TRUE
        }
    };

    Thanks,

    Brian

  • Sorry, forgot the register settings:

    //Receive McAsp configuration
    Mcasp_HwSetupData mcaspRcvSetup = {
            /* .rmask    = */ 0xFFFFFFFF, /* All the data bits are to be used     */
            /* .rfmt     = */ 0x000080F0, /*
                                           * 0 bit delay from framsync
                                           * MSB first
                                           * No extra bit padding
                                           * Padding bit (ignore)
                                           * slot Size is 32
                                           * Reads from DMA port
                                           * NO rotation
                                           */
            /* .afsrctl  = */ 0x00000810, /* burst mode,
                                           * Frame sync is one bit
                                           * Rising edge is start of frame
                                           * externally generated frame sync
                                           */
            /* .rtdm     = */ 0x0000FFFF, /* slot 1 is active (DSP)               */
            /* .rintctl  = */ 0x00000000, /* sync error and overrun error         */
            /* .rstat    = */ 0x000001FF, /* reset any existing status bits       */
            /* .revtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */
            {
                 /* .aclkrctl  = */ 0x00000080,
                 /* .ahclkrctl = */ 0x00000000,
                 /* .rclkchk   = */ 0x00000000
            }
    } ;
    
    Mcasp_HwSetupData mcaspXmtSetup = {
            /* .xmask    = */ 0xFFFFFFFF, /* All the data bits are to be used     */
            /* .xfmt     = */ 0x000080F0, /*
                                           * 0 bit delay from framsync
                                           * MSB first
                                           * No extra bit padding
                                           * Padding bit (ignore)
                                           * slot Size is 32
                                           * Reads from DMA port
                                           * NO rotation
                                           */
            /* .afsxctl  = */ 0x00000810, /* burst mode,
                                           * Frame sync is one bit
                                           * Rising edge is start of frame
                                           * externally generated frame sync
                                           */
            /* .xtdm     = */ 0x0000FFFF, /* slot 1 is active (DSP)               */
            /* .xintctl  = */ 0x00000000, /* sync error,overrun error,clK error   */
            /* .xstat    = */ 0x000001FF, /* reset any existing status bits       */
            /* .xevtctl  = */ 0x00000000, /* DMA request is enabled or disabled   */
            {
                 /* .aclkxctl  = */ 0x000000C0,
                 /* .ahclkxctl = */ 0x00000000,
                 /* .xclkchk   = */ 0x00000000
            },
    
    };

  • Also, when I set XINTCTL.XDATA, I am hitting the mcaspIsrOutput() function. By my understanding, this would imply that data is being shifted from XRBUF to the XRSR shift registers. This, in turn, should imply that an AXEVT DMA interrupt is being generated, which should trigger the DMA callback to transfer samples from the GIO ping-pong buffer to the XBUF register, but this DMA callback is not being triggered for some reason. Why could this be?

  • First sentence above was corrected.

  • Any suggestions?