S43K144 LPSPI setting module "Frame size" parameter setting problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S43K144 LPSPI setting module "Frame size" parameter setting problem

跳至解决方案
1,063 次查看
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,022 次查看
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,023 次查看
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,043 次查看
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 项奖励