LPC802 SPI Justification

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

LPC802 SPI Justification

ソリューションへジャンプ
386件の閲覧回数
fingew
Contributor II

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.

0 件の賞賛
返信
1 解決策
313件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
369件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

 

xiangjun_rong_0-1721180504274.png

 

0 件の賞賛
返信
324件の閲覧回数
fingew
Contributor II

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)?

 

0 件の賞賛
返信
314件の閲覧回数
xiangjun_rong
NXP TechSupport
NXP TechSupport

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

0 件の賞賛
返信
297件の閲覧回数
fingew
Contributor II
Thanks!
0 件の賞賛
返信