S43K144 LPSPI setting module "Frame size" parameter setting problem

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

S43K144 LPSPI setting module "Frame size" parameter setting problem

ソリューションへジャンプ
1,275件の閲覧回数
liuqimin
Contributor IV

Hi:
There is a parameter "Frame size" in the LPSPI setting module. The default setting is "8". It transmits Uint8 type data. Can this parameter be modified to transmit data higher than 8 bits (for example, 40 bits)? But in this case, the data input type of LPSPI's sending module "LPSPI_Master_Transfer" is Uint8, which seems to not support data transmission higher than 8 bits.

liuqimin_0-1603598797522.png

Can anyone answer my question?

 

  Best Regards!

  Liuqimin

0 件の賞賛
返信
1 解決策
1,234件の閲覧回数
liuqimin
Contributor IV

Hi Marius

   I understand what you mean, 40-bit data needs to be split into 5 8-bit arrays for transmission.

   BRs!

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
1,235件の閲覧回数
liuqimin
Contributor IV

Hi Marius

   I understand what you mean, 40-bit data needs to be split into 5 8-bit arrays for transmission.

   BRs!

0 件の賞賛
返信
1,255件の閲覧回数
mariuslucianand
NXP Employee
NXP Employee

Hello @liuqimin ,

You can send more than 8 bits per frame. There are two ways.

1. The easiest one is to set the Frame size to 8 and to check the continuous transfer.

mariuslucianand_0-1603706696111.png

 

In this way, to send 40 bits you have to provide to the SPI_Master_Transfer an array of (Number of frames) x 5 bytes of data elements, and the PCS will be low during all the transfer time.

2. If you typed 40 bits per frame in the config block, as in the screenshot, then the things get a bit complicated because you have to align data at uint32_t I can elaborate if needs be.

Hope this helps,

Marius

0 件の賞賛
返信