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
解決済! 解決策の投稿を見る。
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.
-------------------------------------------------------------------------------
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.
-------------------------------------------------------------------------------
Hello Robin,
thanks for your suggestion.
Kind regards,
Nanjun