Changing SPI framesize on S32K1

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

Changing SPI framesize on S32K1

746件の閲覧回数
superbird
Contributor I

Hello all,
I have a problem with the S32K146 and the SPI communication. But maybe the problem is due to my lack of knowledge about SPI communication. I have a device running as SPI master with framesize configured to 8 bits.
This setup works as expected. There are always 4 bytes exchanged between master and slave. So I want to change the framesize 8 to framesize 32.
However, then the received data is no longer valid. Do I have to consider other parameters when changing the framesize?
According to my theoretical understanding this should not be the case. However, maybe I am wrong....
I'm using the RTD driver V1.01.
Thank you for your help.

0 件の賞賛
返信
2 返答(返信)

728件の閲覧回数
VaneB
NXP TechSupport
NXP TechSupport

Hi @superbird 

  • The minimum frame size is 8 bits
  • The minimum word size is 2 bits; a frame size of 33 bits (or similar) is not supported.
  • If the frame size is larger than 32 bits, then the frame is divided into multiple words of 32-bits; each word is loaded from the transmit FIFO and stored in the receive FIFO separately.
  • If the size of the frame is not divisible by 32, then the last load of the transmit FIFO and store of the receive FIFO will contain the remainder bits. For example, a 72-bit transfer will consist of 3 words:
    the 1st and 2nd words are 32 bits, and the 3rd word is 8 bits.

At RTD Lpspi_Ip_UpdateFrameSize updates the frame size of the specific external device configuration for the following transfers.

 

B.R.

VaneB

0 件の賞賛
返信

344件の閲覧回数
AnhNguyenDuc
NXP Employee
NXP Employee

Hi @VaneB ,

With 12bit (0-11) of Frame size of TCR register, what values we can set for the 12bit of Frame size ?

Thanks

0 件の賞賛
返信