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.

4 bits reverse with Am335x McASP

Hi,

 

I am using Sitara am335x and facing a need to have the bits in the 32 bits transmit buffer being reversed on each set of 4 bits,

Here is following an example of the data stream I want to see when I probe the McASP data pin on a scope after I sent the given stream:

I sent to McASP (32bits) (through a user space application) following 32 bit stream per frame:   0111 0000 1000 0000 0000 0000 0000 0000 

and I want the data at the data pin (AXR) to be: 1110 0000 0001 0000 0000 0000 0000 0000

As you can see, no byte swaping, just bit reversing.

Is such bit ordering (4 bits reverse) possible by correctly programming McASP's relevant registers? I  read back for example a McASP register such as XFMT (I am only doing data transmission from McASP) during data streaming, this register (XFMT) value is 0x00018074 which means that:

XRVS (transmit bit order bit#15) =1 :bit reverse, so I was expected my data to be bit reversed, but it is NOT. It still the same as the original 32bit  data sent to McASP (bits order did not change)!!

Is anyone have a hint on this operation in case it is feasible by McASP registers settings? I am trying to avoid writing this bits reversal in code which can be MIPS costly. If Sitara can do it in HW, it will be so great!