What is the justification for data in the TXDAT and RXDAT registers for the SPI peripheral for the LPC802? Does it matter if the output is selected as LSB or MSB first?
The User's Manual is silent on the subject.
解決済! 解決策の投稿を見る。
Hi
Q:Let me give an example. Say you have the transfer configured for 12-bit length, and you receive data, say all ones.
Would the data register be 0xFFF0 (left justification) or 0x0FFF (right justification)?
>>>>>The LPC802 SPI always use right justification, for example, if you want to receive 12 bits data with all bits 1, you will receive 0x0FFF in the receiver reg.
Hope it can help you
BR
XiangJun Rong
Hi,
You can select the MSB first or LSB first, but the master spi and slave spi devices must match.
Pls refer to section 14.6.1 SPI Configuration register in the UM11045.pdf
The LSBF bit in the CFG reg defines the MSB/LSB first.
Hope it can help you
BR
XiangJun Rong
Thank you, but that doesn't answer my question.
Let me give an example. Say you have the transfer configured for 12-bit length, and you receive data, say all ones.
Would the data register be 0xFFF0 (left justification) or 0x0FFF (right justification)?
Hi
Q:Let me give an example. Say you have the transfer configured for 12-bit length, and you receive data, say all ones.
Would the data register be 0xFFF0 (left justification) or 0x0FFF (right justification)?
>>>>>The LPC802 SPI always use right justification, for example, if you want to receive 12 bits data with all bits 1, you will receive 0x0FFF in the receiver reg.
Hope it can help you
BR
XiangJun Rong