Hi guys,
Just having some confusion over what endian the SSC peripheral is outputting. I've configured it with a WM8731 codec (which I know is big endian [MSB first]) with an input word length of 32 bits. When I receive input from the codec, what am I getting out of the SSC peripheral? Is the data little endian or big endian? I can't seem to find a confirmation within the documentation.
Thanks!
SSC Endian Type Confusion
- blue_z
- Location: USA
Post
But you can configure whether the most- or least-significant bit is transmitted first (MSBF bit in the SSC_TFMR register).
There is a (32-bit) shift register for the transmitted data.
Either the least-significant bit is shifted out first, followed by the adjacent bit, and the most-significant bit of the data is last, or the most-significant bit is shifted out first, followed by the adjacent bit, and the least-significant bit of the data is last.
Since the bit-order is always preserved within the transmission, the bit-order in the case of MSBF=0 does not resemble little-endian, but the other case, MSBF=1, the bit- and byte-order does resemble big-endian.
Regards
Re: SSC Endian Type Confusion
Technically it's neither (endian being only a byte-order storage concept, and ambiguous for bit-serial communications).yun wrote:Just having some confusion over what endian the SSC peripheral is outputting.
...
Is the data little endian or big endian?
But you can configure whether the most- or least-significant bit is transmitted first (MSBF bit in the SSC_TFMR register).
There is a (32-bit) shift register for the transmitted data.
Either the least-significant bit is shifted out first, followed by the adjacent bit, and the most-significant bit of the data is last, or the most-significant bit is shifted out first, followed by the adjacent bit, and the least-significant bit of the data is last.
Since the bit-order is always preserved within the transmission, the bit-order in the case of MSBF=0 does not resemble little-endian, but the other case, MSBF=1, the bit- and byte-order does resemble big-endian.
Regards
Post
Re: SSC Endian Type Confusion
Thanks man! I just realized I could do that too haha.blue_z wrote:Technically it's neither (endian being only a byte-order storage concept, and ambiguous for bit-serial communications).yun wrote:Just having some confusion over what endian the SSC peripheral is outputting.
...
Is the data little endian or big endian?
But you can configure whether the most- or least-significant bit is transmitted first (MSBF bit in the SSC_TFMR register).
There is a (32-bit) shift register for the transmitted data.
Either the least-significant bit is shifted out first, followed by the adjacent bit, and the most-significant bit of the data is last, or the most-significant bit is shifted out first, followed by the adjacent bit, and the least-significant bit of the data is last.
Since the bit-order is always preserved within the transmission, the bit-order in the case of MSBF=0 does not resemble little-endian, but the other case, MSBF=1, the bit- and byte-order does resemble big-endian.
Regards
Return to “SAM3 Cortex-M3 MCU”
Who is online
Users browsing this forum: No registered users and 2 guests