FS32K144 lpspi transfer multiple bytes

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

FS32K144 lpspi transfer multiple bytes

ソリューションへジャンプ
2,304件の閲覧回数
nanjun
Contributor III

Hello,

With FS32k144 I would like to transfer and receive large data size such as 1000 bytes via lpspi.

1. Is it possible to fill 2000 bytes in one spi transfer?

As I understood, FRAMESZ can only be set as 0-4095 bits. But it is still not large enough.The data rate can be 500k or less. Is there any example as reference? The example lpspi_transfer only transfers 1 bytes within one fram.

2. 2000 bytes is the max. data size. But the amount of data can be dynamic und not predictable in our case..such as 100,200. How can it be implemented in the receiver part if we do not know the exact data size?

Kind regards,

Nanjun

 

 

 

 

0 件の賞賛
返信
1 解決策
2,276件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Nanjun,

FRAMESZ is used to configure the number of bits in a frame.
For example: if you configure FRAMESZ=15 , then you will see 15+1=16 bits in a frame(between a PCS activate and a de-activate)
Since you want to transmit in byte, each frame should be 8bit.

If you don't want the PCS de-activate between frames, you may need to use Continuous Transfer bit (CONT)=1.

Please refer to the lpspi_dma_s32k144 example, it will show you how to transfer 100(NUMBER_OF_FRAMES) bytes and loop 1000(count) times.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

元の投稿で解決策を見る

0 件の賞賛
返信
2 返答(返信)
2,277件の閲覧回数
Robin_Shen
NXP TechSupport
NXP TechSupport

Hi Nanjun,

FRAMESZ is used to configure the number of bits in a frame.
For example: if you configure FRAMESZ=15 , then you will see 15+1=16 bits in a frame(between a PCS activate and a de-activate)
Since you want to transmit in byte, each frame should be 8bit.

If you don't want the PCS de-activate between frames, you may need to use Continuous Transfer bit (CONT)=1.

Please refer to the lpspi_dma_s32k144 example, it will show you how to transfer 100(NUMBER_OF_FRAMES) bytes and loop 1000(count) times.

Best Regards,
Robin
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 件の賞賛
返信
2,256件の閲覧回数
nanjun
Contributor III

Hello Robin,

thanks for your suggestion.

Kind regards,

Nanjun

 

0 件の賞賛
返信