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.

Read McASP XBUF

Hi,

I am receiving audio data on McASP AXR2 pin and want to read the data many time from the receive format unit.

From the AM335x guide, the registers that hold this data is RBUF_0 to RBUF_5 (offset 0x280h-0x294h) and each buffer is 32 bits.

In my McASP configuration, I setup 8 TDM slots, 32bits/slot of data and I am trying to read the register with following command:

for example for RBUF_0:

>devmem2 0x48038280 (my McASP base address is 0x48038000)

This always return 0 as values but if I scope the ARX2 pin, I do see data activity!

am I missing something how to properly read the content of RBUFs?

  • In the memory map you'll see two addresses associated with McASP0:

    • 0x4600_0000, McASP0 Data
    • 0x4803_8000, McASP0 CFG

    The RFMT register has a bitfield called RBUSEL (bit 3). This bit is to choose whether you want to access your data from the "data" port or the "config" port.  I expect that RBUSEL=0 in your case, meaning that all the data accesses are done through the first address I showed above.  And unfortunately it also mentions that accesses to the config bus (i.e. to the RBUF_n registers) are ignored.

    PEleph said:
    am I missing something how to properly read the content of RBUFs?

    Are you trying to do this through the debugger in addition to the normal code (i.e. is there an ISR that's emptying the data from the 0x4600_0000 address)?  This sort of thing is very tough to do when the CPU is involved too, because if for example you happen to read the FIFO before the CPU, that's going to mess up the order of things for the ISR.

    It sounds like you're trying to debug some kind of issue.  Perhaps we should take a step back to understand what you're debugging, i.e. perhaps there's a different way to do it.