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 using XBUF and RBUF

Hi,

 

I've the McASP working using polling mode and using XBUF13 and RBUf14.

Now I want to use the fifo to collect groups of samples for me.

To make changes gradually, I first tried using XBUF and RBUF directly to supply data to the McASP. Unfortunately this does not work.

From the OMAP manual I understood that the correct offset is 0x2000 (the C6748 Technical Manual does not state the offset), so I use

HWREG(SOC_MCASP_0_CTRL_REGS + 0x2000) = buffer;

and

buffer=HWREG(SOC_MCASP_0_CTRL_REGS + 0x2000);

to read and write data.

I tried with both (X/R)BUSSEL=1 and (X/R)BUSSEL=0.

I made no further changes to the (working) McASP code, so the FIFO's are still disabled at this point.

Am I wrong thinking that I can use the X/RBUF registers to supply data to the McASP like the DMA controller does? I based my thoughts mainly on these threads:

http://e2e.ti.com/support/dsp/omap_applications_processors/f/42/t/12178.aspx

http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/t/218710.aspx

 

Thanks in advance.

 

Kind regards,

 

Remco Poelstra

 

  • Remco,

    Remco Poelstra said:
    From the OMAP manual I understood that the correct offset is 0x2000 (the C6748 Technical Manual does not state the offset)

    The C6748 Data Manual Table 5-50 lists the addresses for the DMA-port RBUF and XBUF ports.

    Remco Poelstra said:
    I tried with both (X/R)BUSSEL=1 and (X/R)BUSSEL=0.

    You may want to check if your XFMT configuration uses the right spelling. In the McASP User Guide, it names these fields: RBUSEL and XBUSEL.

    This should both be 0 to allow the DSP to read and write RBUF and XBUF, respectively.

    Remco Poelstra said:
    Am I wrong thinking that I can use the X/RBUF registers to supply data to the McASP like the DMA controller does?

    This should work as you have described it. Please let us know what additional debug work you have done in the past few days.

    Regards,
    RandyP

  • Hi,

     

    I found the problem! The demo app which I loaded on the board is the McASP playthrough app. That demo app had the DMA controller configured, so when I enabled the DMA port, the DMA controller as well as my code started providing data to the McASP.

    Is there a way to have a system reset performed automatically when starting a debug session? That would avoid such problems as these.

     

    Kind regards,

     

    Remco Poelstra

     

  • Remco,

    You should have a GEL file associated with your C674x core in your Target Configuration. You can add a "callback" function such as OnPreFileLoaded() and include some initialization things, if that is what you want to do.

    Here is an example you might consider:

    /* ------------------------------------------------------------------------ *
     *                                                                          *
     *  OnPreFileLoaded( )                                                      *
     *      This function is called automatically when the 'Load Program'       *
     *      Menu item is selected.                                              *
     *                                                                          *
     * ------------------------------------------------------------------------ */
    OnPreFileLoaded( )
    {
        /*
         *  GEL_Reset() is used to deal with the worst case senario of
         *  unknown target state.  If for some reason a reset is not desired
         *  upon target connection, GEL_Reset() may be removed and replaced
         *  with something "less brutal" like a cache initialization
         *  function.
         */
        GEL_Reset();
     
        DEVICE_kickUnlock(); // No longer needed for Si Rev 2.0+
        PSC_All_On_Full_EVM();
        Core_300MHz_mDDR_150MHz();
     
        GEL_TextOut( "Device reset complete\n" );
    }

    You can learn more about the callback functions from the CCS menu Help->Help Contents.

    Regards,
    RandyP

  • Thanks. That indeed seems to be the kind of thing I would like to have done automatically.

    Regards,

     

    Remco Poelstra