S43K144 LPSPI setting module "Frame size" parameter setting problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S43K144 LPSPI setting module "Frame size" parameter setting problem

Jump to solution
1,000 Views
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 Kudos
1 Solution
959 Views
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!

View solution in original post

0 Kudos
2 Replies
960 Views
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 Kudos
980 Views
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 Kudos